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 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

configd = null;
};
python2 = self.python;
python3 = super.python3Minimal;
Copy link
Member Author

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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

- 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 changed the title [WIP] darwin-stdenv: bootstrap with python3 darwin-stdenv: bootstrap with python3 Jan 13, 2020
@LnL7
Copy link
Member Author

LnL7 commented Jan 13, 2020

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

@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
Staging automation moved this from Ready to Done Jan 15, 2020
Python 2 deprecation automation moved this from Ready to Done Jan 15, 2020
@bobrik bobrik mentioned this pull request Jan 29, 2021
10 tasks
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

4 participants