Skip to content

libxslt: use python3 on darwin #111212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2021
Merged

libxslt: use python3 on darwin #111212

merged 2 commits into from
Feb 1, 2021

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Jan 29, 2021

Motivation for this change

See #63174 where the condition was first introduced. In #77610 it was dropped for libxml2

Not having python2 helps with #105026.

cc @NixOS/darwin-maintainers

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@bobrik bobrik mentioned this pull request Jan 29, 2021
21 tasks
@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 501+ 10.rebuild-darwin: 5001+ 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 29, 2021
@SuperSandro2000
Copy link
Member

/rebase-staging

@github-actions github-actions bot changed the base branch from master to staging January 29, 2021 22:45
See NixOS#63174 where the condition was first introduced.
@@ -3710,7 +3710,7 @@ in {

libxslt = (toPythonModule (pkgs.libxslt.override {
pythonSupport = true;
inherit python;
python3 = python;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awkward now, but this is what other packages do in this file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more elegant way would be to remove this line and add disabled to the package. You need to input python and not python3 here because otherwise it would break the package for different python versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more elegant way would be to remove this line and add disabled to the package.

Like disabledIf (!isPy3k)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is here is fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabledIf (!isPy3k)

That's for in case the bindings are no longer Python 2 compatible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like disabledIf (!isPy3k)?

in the package: disabled = !isPy3k;.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package itself builds ok with python2 (it was the default on darwin after all), why disable it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just answered your question. Packages schools not be null when a specific platform is not supported.

@ofborg ofborg bot requested a review from edolstra January 30, 2021 07:45
Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming the packages build still with Python 2 and 3 on all platforms this looks good to me.

@FRidh FRidh merged commit b2ce768 into NixOS:staging Feb 1, 2021
@bobrik bobrik deleted the ivan/libxslt-py3 branch March 6, 2021 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 6.topic: python 10.rebuild-darwin: 501+ 10.rebuild-darwin: 5001+ 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants