Skip to content

setuptoolsCheckPhase: allow providing arguments via setuptoolsCheckFl… #102348

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

Closed
wants to merge 1 commit into from

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Nov 1, 2020

…agsArray

Motivation for this change

cherry-picked from https://github.com/NixOS/nixpkgs/pull/102306/files#diff-78e272fcdca196c9997e1a2da70702ea519a5ebcea9a396bbb7f876750130844

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.

Sorry, something went wrong.

@Mic92 Mic92 requested a review from FRidh as a code owner November 1, 2020 13:08
@Mic92 Mic92 mentioned this pull request Nov 1, 2020
15 tasks
@@ -6,7 +6,7 @@ setuptoolsCheckPhase() {
runHook preCheck

cp -f @setuppy@ nix_run_setup
@pythonCheckInterpreter@ nix_run_setup test
@pythonCheckInterpreter@ nix_run_setup test "${setuptoolsCheckFlagsArray[@]}"
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 do we need documentation for this one?

Copy link
Member

Choose a reason for hiding this comment

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

There is a ### Setup hooks in python.section.md. Probably good to mention it there.

@FRidh
Copy link
Member

FRidh commented Nov 1, 2020

Change looks good to me, however, note that setuptools has deprecated support for python setup.py test #71897.

For 21.03 we need to change buildPythonPackage default from format = "setuptools"; to format = "pyproject". That also means that, unless this hook is explicitly included, one needs to specify a checkPhase manually.

Therefore, please avoid relying on this test invocation.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Nov 1, 2020

Change looks good to me, however, note that setuptools has deprecated support for python setup.py test #71897.

For 21.03 we need to change buildPythonPackage default from format = "setuptools"; to format = "pyproject". That also means that, unless this hook is explicitly included, one needs to specify a checkPhase manually.

Therefore, please avoid relying on this test invocation.

I have no clue if that works with pyobjc or not. When I tried executing the tests with pytest I got a lot of errors.

I could also change my PR to: python setup.py test --verbosity=3

@FRidh
Copy link
Member

FRidh commented Nov 1, 2020

I have no clue if that works with pyobjc or not. When I tried executing the tests with pytest I got a lot of errors.

You can keep it, but realize that as soon as we change the default, all these packages will fail to build because no tests are run anymore. Of course we can keep that for until then, if its unclear how to solve it now.

@SuperSandro2000
Copy link
Member

I try running it manually to avoid the mass rebuild and future deprecation.

@SuperSandro2000
Copy link
Member

Thanks for the cherry-pick and the quick responses but I decided to avoid the deprecation and mass rebuilding and invoking it manually in checkPhase. This PR can be closed.

@Mic92 Mic92 closed this Nov 1, 2020
@Mic92 Mic92 deleted the setuptools-check-array branch July 23, 2021 08:29
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

4 participants