-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
Python3Packages.simplekv: Improperly adds pytestCheckHook to dependencies #382050
Comments
I may be able to offer a small refactor of the simplekv package, moving things to using |
seems that #303895 should be mostly reverted |
I think it is a bit more subtle than that. The usage of dependencies is fine for everything EXCEPT pytestCheckHook. I dont really care for dependencies as a attr name here, as it is different from other derivations and confuses some subtle distinctions between dependency kind as shown off in this derivation, but it does work to simplify the packaging of new stuff for new contributors, so I'm not 100% sure what to take away from the whole thing.
I think we should simply move pytestCheckHook to nativeCheckInputs and leave the rest of the referenced commit as is.
|
They were originally all part of |
I didn't believe that could've been right, but checking |
Seems at least And according to https://github.com/mbr/simplekv/blob/master/docs/changes.rst So I guess, |
Well, this isn't the full picture. simplekv has a number of backends. Each is largely independent of the rest, but shares a common interface. The reason simplekv doesn't advertise exact dependencies is that all of the dependencies are optional and all of them depend on the consumer's usage. For instance, we only use the JsonStore (which has no dependencies) and the RedisStore (which depends on the redis library). I don't particularly want gae or dulwich installed when I am only using those two stores. The totally correct answer (as I understand it) here is to use In other words: the thing simplekv is doing is python-y. I don't love it, but I understand why they're doing it. To emulate it, we'd need something more complicated, but I'm not sure it is immediately worth the effort to do this 100% correctly. I think everything should just go into |
Okay, if |
Nixpkgs version
Describe the bug
simplekv uses
dependencies
to addbuildInputs
to itself. These end up inpropagatedBuildInputs
, which causes everything downstream of this package to end up running pytestCheckHook, even ifdoCheck
is false. You can avoid this by settingdontUsePytestCheck
, but that is poorly documented and will be necessary in all consuming packages, which is onerous for consumers.Steps to reproduce
use
python3.buildPythonPackage
to bundle any python library (orpython3.buildPythonApplication
for any python application) and addsimplekv
topropagatedBuildInputs
and setdoCheck
tofalse
(I cannot offer a reproduction repository at this time, I am sorry). You will notice thatpytestCheckPhase
is run in the dependent package.Expected behaviour
I would expect test behavior to be isolated to the package requesting them
Screenshots
No response
Relevant log output
Additional context
No response
System metadata
"x86_64-linux"
Linux 5.14.0-503.22.1.el9_5.x86_64, Red Hat Enterprise Linux, 9.5 (Plow), nobuild
yes
yes
nix-env (Lix, like Nix) 2.91.1 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/bbennett37/.config/nix/nix.conf:/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/lknx1arna0x37dg61ixsjbdlwcy9dvld-lix-2.91.1/share
/nix/store/56m82shl5xdjl0s54licn6davvpj12as-source
Notify maintainers
@fabaff
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE
.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: