Skip to content

Python package set bootstrap update#232451

Closed
mweinelt wants to merge 12 commits intoNixOS:masterfrom
mweinelt:python-pkgs-bootstrap
Closed

Python package set bootstrap update#232451
mweinelt wants to merge 12 commits intoNixOS:masterfrom
mweinelt:python-pkgs-bootstrap

Conversation

@mweinelt
Copy link
Member

@mweinelt mweinelt commented May 17, 2023

As more and more low-level packages are moving towards flit-core,
we need to bootstrap it and other packages to escape infinite recursion
scenarios at the base of our package set.

Next packages like build and installer should be made more lean, so they
can be used in our build and install phase hooks for pyproject based builds.

Taking the chance to also adopt a few core packages to the python team.

The changes already build, but I'm very much open to discussion of how
I solved things.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label May 17, 2023

buildPhase = ''
runHook preBuild
${python.interpreter} -m flit_core.wheel
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need forBuild here?

Suggested change
${python.interpreter} -m flit_core.wheel
${python.pythonForBuild.interpreter} -m flit_core.wheel

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

good idea and good to adopt those packages into the team

Comment on lines 27 to +28
hash = "sha256-iXf9K/xI4u+dDV0Zf6S08nbws4NqycrTEW0B8/qCjQc=";
name = "${pname}-${version}-source";
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 tried it locally and that does not change the hash which is really surprising to me because I always thought it did. Only the store path changed.


installPhase = ''
runHook preInstall
ls -lah
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ls -lah

Comment on lines 36 to 37
propagatedBuildInputs = [
] ++ lib.optionals (pythonOlder "3.11") [
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
propagatedBuildInputs = [
] ++ lib.optionals (pythonOlder "3.11") [
propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [

nit

@SuperSandro2000
Copy link
Member

I just built up to python310.pkgs.cryptography 👍🏼

@mweinelt
Copy link
Member Author

This is all going to change again, not worth building upon currently. Don't bother.

@doronbehar
Copy link
Contributor

This is all going to change again, not worth building upon currently. Don't bother.

Why?

@mweinelt
Copy link
Member Author

mweinelt commented Jul 15, 2023

Because bootstrap should happen through the build and installer packages, instead of setuptools and pip.

But apparently I lack the energy to follow through here.

@mweinelt
Copy link
Member Author

mweinelt commented Aug 6, 2023

Superseded by #245509

@mweinelt mweinelt closed this Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments