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

darwin-stdenv: bootstrap with python3 #77610

Merged
merged 9 commits into from Jan 15, 2020
Merged

Conversation

@LnL7
Copy link
Member

LnL7 commented Jan 13, 2020

Motivation for this change

With python2 EOL many packages have been switched to python3 by default, but anything that's part of the darwin stdenv couldn't be switched without introducing 2 python versions during bootstrapping.

Also resolves part of #77535.

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.

/cc @NixOS/darwin-maintainers

LnL7 added 6 commits Jan 12, 2020
@LnL7 LnL7 requested review from FRidh and matthewbauer as code owners Jan 13, 2020
configd = null;
};
python2 = self.python;
python3 = super.python3Minimal;

This comment has been minimized.

Copy link
@LnL7

LnL7 Jan 13, 2020

Author Member

@FRidh This used to be a separate (minimal) copy to make python updates easier, would you like me to do the same for python3?

This comment has been minimized.

Copy link
@FRidh

FRidh Jan 13, 2020

Member

Darwin has pkgs/development/interpreters/python/cpython/2.7/boot.nix which is now removed. If you think you need that for Python 3, then yes, you can create it. Maybe you can indeed use python3Minimal? Note that was added by @adisbladis and serves a different purpose.

This comment has been minimized.

Copy link
@LnL7

LnL7 Jan 13, 2020

Author Member

Strictly speaking it's not necessary. But otherwise changing anything anything that's not version guarded, like the setup-hook, will also change this. Causing a full stdenv rebuild which can be pretty awkward.

This comment has been minimized.

Copy link
@FRidh

FRidh Jan 13, 2020

Member

It's not often we change the Python 3 expression, and when we do it goes to staging. Anyway, it's up to you.

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Jan 13, 2020

Member

Yeah the python2 boot thing was more of a hack than anything. I actually thought it had to do with needing configd for cpython, which looks like is no longer necessary.

This comment has been minimized.

Copy link
@LnL7

LnL7 Jan 13, 2020

Author Member

I'll leave as is for now, we can always add that later if it's a problem.

LnL7 added 3 commits Jan 12, 2020
- Replaced python override from the final stdenv, instead we
  propagate our bootstrap python to stage4 and override both
  CF and xnu to use it.

- Removed CF argument from python interpreters, this is redundant
  since it's not overidden anymore.

- Inherit CF from stage4, making it the same as the stdenv.
@LnL7 LnL7 force-pushed the LnL7:darwin-stdenv-python3 branch from b347fde to c05efed Jan 13, 2020
@FRidh FRidh added this to WIP in Python 2 deprecation Jan 13, 2020
@LnL7 LnL7 changed the title [WIP] darwin-stdenv: bootstrap with python3 darwin-stdenv: bootstrap with python3 Jan 13, 2020
@LnL7

This comment has been minimized.

Copy link
Member Author

LnL7 commented Jan 13, 2020

Most of the clang builds finished so this is probably fine.

@FRidh
FRidh approved these changes Jan 13, 2020
@FRidh FRidh moved this from WIP to Ready in Python 2 deprecation Jan 13, 2020
@FRidh FRidh added this to WIP in Staging via automation Jan 13, 2020
@FRidh FRidh moved this from WIP to Ready in Staging Jan 13, 2020
@FRidh FRidh merged commit bc18cc7 into NixOS:staging Jan 15, 2020
16 checks passed
16 checks passed
darwin.CF, darwin.iproute2mac, darwin.libtapi, darwin.xnu, libxml2, ninja, stdenv on aarch64-linux Timed out, unknown build status
Details
darwin.CF, darwin.iproute2mac, darwin.libtapi, darwin.xnu, libxml2, ninja, stdenv on x86_64-darwin Timed out, unknown build status
Details
darwin.CF, darwin.iproute2mac, darwin.libtapi, darwin.xnu, libxml2, ninja, stdenv on x86_64-linux Timed out, unknown build status
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Staging automation moved this from Ready to Done Jan 15, 2020
Python 2 deprecation automation moved this from Ready to Done Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.