Skip to content
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

wafHook: use python3 #104701

Closed
wants to merge 1 commit into from
Closed

wafHook: use python3 #104701

wants to merge 1 commit into from

Conversation

raboof
Copy link
Member

@raboof raboof commented Nov 23, 2020

Rather than 'python' which will be stuck on python2 for a while for
compatibility reasons.

Motivation for this change
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.

@veprbl
Copy link
Member

veprbl commented Nov 23, 2020

Also see relevant discussion in #69310

@raboof
Copy link
Member Author

raboof commented Nov 23, 2020

Also see relevant discussion in #69310

Thanks, not sure how I missed that. While I think the direction that is going into sounds great, I also don't feel qualified to move that one forward. Perhaps 'just' the update to python3 would already be a useful (though less ambitious) change?

@veprbl
Copy link
Member

veprbl commented Nov 23, 2020

Perhaps 'just' the update to python3 would already be a useful (though less ambitious) change?

What is it meant to achieve? You should already be able to add (wafHook.override { python = python3; }) in your expressions.

@raboof
Copy link
Member Author

raboof commented Nov 23, 2020

What is it meant to achieve

My short-term goal was to remove python2 from the talloc derivation, in order to go in the direction of removing all references to python2 from the closure of the nixos_minimal derivation, which is a (admittedly somewhat arbitrary) milestone we're working towards for https://r13y.com/

Currently one of the ways it still depends on python2 is via the use of wafHook while building talloc.

Now of course I could just override the wafHook specifically for talloc, but it seemed more healthy to make python3 the norm rather than the exception.

@veprbl veprbl added this to Needs review in Python 2 deprecation Nov 23, 2020
@raboof raboof changed the base branch from master to staging November 23, 2020 21:16
@veprbl veprbl added this to WIP in Staging via automation Nov 23, 2020
@veprbl veprbl moved this from WIP to Needs review in Staging Nov 23, 2020
@ajs124 ajs124 mentioned this pull request Nov 30, 2020
10 tasks
@dasJ dasJ mentioned this pull request Dec 10, 2020
10 tasks
raboof added a commit to raboof/nixpkgs that referenced this pull request Dec 11, 2020
This makes sure waf, which is used to build talloc, is ran
with python3 rather than python2.

(another option would be to make this the default for
wafHook, see NixOS#104701)
Rather than 'python' which will be stuck on python2 for a while for
compatibility reasons.
@FRidh
Copy link
Member

FRidh commented Dec 17, 2020

Closing in favor of #106533.

@FRidh FRidh closed this Dec 17, 2020
Staging automation moved this from Needs review to Done Dec 17, 2020
Python 2 deprecation automation moved this from Needs review to Done Dec 17, 2020
@FRidh
Copy link
Member

FRidh commented Dec 17, 2020

Now of course I could just override the wafHook specifically for talloc, but it seemed more healthy to make python3 the norm rather than the exception.

There will most likely be regressions in some packages, because the embedded waf scripts may still be python 2 only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants