Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

python build time dependencies should not be included in the sys.path at run time #210

Closed
cillianderoiste opened this Issue · 7 comments

3 participants

@cillianderoiste
Collaborator

Reported in IRC:

(19:23:05) shlevy: goibhniu: Well, $nose/lib/python2.7/site-packages/python-nose-1.2.1-nix-python-build-inputs.pth contains the path to python-coverage, presumably because coverage is a buildInput
(19:23:20) shlevy: goibhniu: But coverage is only needed at build time, this makes it a runtime dependency

@chaoflow chaoflow referenced this issue from a commit
@chaoflow chaoflow do not create e.g pth file for build inputs
if they are really needed they will be in pth file created by
easy_install. If that does not work, they need to be put into
propagatedBuildInputs or the setup.py fixed.

see #210
aab93e8
@cillianderoiste
Collaborator

I suspect @chaoflow or @shlevy have already fixed this. No python-nose-1.2.1-nix-python-build-inputs.pth gets created here when I install nose, only easy-install.pth

@shlevy
Collaborator
$ cat /nix/store/bnsk2a7i99x783nfdbwih5ykaifi7llb-python-nose-1.2.1/lib/python2.7/site-packages/python-nose-1.2.1-nix-python-build-inputs.pth
/nix/store/nph98gpr2xj255f5vz20y3lgb4cmvra4-python-coverage-3.5.3/lib/python2.7/site-packages
@shlevy shlevy reopened this
@shlevy
Collaborator

This is with latest nixpkgs (commit 129aa4d)

@cillianderoiste
Collaborator

Yes indeed, sorry! I was looking in totally the wrong place. Checking it out now ...

@cillianderoiste
Collaborator

In the current setup python package buildInputs could either be libraries used for compilation of c modules e.g. lxml or, as in this case python modules which are required for running the tests during build time.

To keep the python modules used for testing out of the installed module we could remove out the line:
createBuildInputsPth build-inputs "$buildInputStrings"

https://github.com/NixOS/nixpkgs/blob/6278dabe5ddd6c24bb8e2c9a34c5634c9e7a9b86/pkgs/development/python-modules/generic/default.nix#L104

I have a feeling that we included this line because we thought modules required for running tests should be handled separately from buildInputs, but decided not to tackle this issue straight away. Does that sound right @chaoflow? It doesn't seem very useful to me personally to be able to run tests on installed modules. Perhaps the recent support for multiple outputs could help tidy this up.

At any rate, it doesn't bother me if this line stays or gos.

@chaoflow
Collaborator
@chaoflow
Collaborator

python2.6 compiles again, continuing improvements, like not creating a pth for buildInputs

@chaoflow chaoflow closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.