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

buildPythonPackage: initial support for PEP 517 #55962

Closed
wants to merge 1 commit into from

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Feb 17, 2019

Motivation for this change

Implements #55961.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

to do:

  • documentation (use nativeBuildInputs for requires)
  • changelog. Default is now pyproject, which runs python -m unitest discover instead of python setup.py test
  • deprecate setuptools and flit formats, although they could simply append their requires to nativeBuildInputs

@@ -32,12 +33,13 @@ in
# "wheel" : Install from a pre-compiled wheel.
# "flit" : Install a flit package. This builds a wheel.
# "other" : Provide your own buildPhase and installPhase.
format ? "setuptools"
format ? "pyproject"
Copy link
Member Author

Choose a reason for hiding this comment

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

Many older projects still use python setup.py test.


installCheckPhase = attrs.checkPhase or ''
runHook preCheck
${python.interpreter} -m unittest discover
Copy link
Member Author

Choose a reason for hiding this comment

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

Perhaps better to exit with a non-zero status and require a checkPhase to be passed in.

@FRidh
Copy link
Member Author

FRidh commented Feb 23, 2019

Included as e7b4608 in staging-next.

@FRidh FRidh closed this Feb 23, 2019
@FRidh FRidh deleted the 517 branch February 23, 2019 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants