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

pythonPackages.pytest-dependency: fix build #60280

Merged
merged 1 commit into from May 3, 2019

Conversation

marsam
Copy link
Contributor

@marsam marsam commented Apr 26, 2019

Motivation for this change

Fixes #60239
cc: @CMCDragonkai

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 nix-review --run "nix-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.

@@ -9,7 +9,16 @@ buildPythonPackage rec {
sha256 = "bda0ef48e6a44c091399b12ab4a7e580d2dd8294c222b301f88d7d57f47ba142";
};

propagatedBuildInputs = [ pytest ];
nativeBuildInputs = [ pytest ];
Copy link
Member

Choose a reason for hiding this comment

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

If you do this it doesn't add pytest to result/nix-support/propagated-build-inputs.
Since it's in the install_requires of pytest-dependency I think that is desirable.

What I'd suggest, is to add pytest to propagatedBuildInputs and checkInputs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right, fixed. thanks!

@marsam marsam force-pushed the fix-build-pytest-dependency branch from a6df1ae to 8d0e3ad Compare April 26, 2019 19:29
Copy link
Member

@JohnAZoidberg JohnAZoidberg left a comment

Choose a reason for hiding this comment

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

Builds properly and I can import it in a Python shell. Not sure if it does the right thing.
I trust that you tried to use the package and it works?

@CMCDragonkai
Copy link
Member

I use pytest-dependency prior to this and I had put pytest in the propagatedBuildInputs before and it worked fine.

@JohnAZoidberg
Copy link
Member

So you think this PR is correct?

@FRidh
Copy link
Member

FRidh commented May 1, 2019

@GrahamcOfBorg build python2.pkgs.pytest-dependency python3.pkgs.pytest-dependency

@@ -9,8 +9,19 @@ buildPythonPackage rec {
sha256 = "bda0ef48e6a44c091399b12ab4a7e580d2dd8294c222b301f88d7d57f47ba142";
};

patches = [
Copy link
Member

Choose a reason for hiding this comment

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

What does this patch do? Please comment about it.

Copy link
Member

Choose a reason for hiding this comment

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

I think the comment is good enough. There's not really a lot to say about the patch.

@marsam marsam merged commit d4cbc67 into NixOS:master May 3, 2019
@marsam marsam deleted the fix-build-pytest-dependency branch May 3, 2019 19:37
@CMCDragonkai
Copy link
Member

Please backport this to 19.03.

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.

[19.03] pytest-dependency fails to build
4 participants