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

Allow passing extra paths to non-python packages into python.buildEnv. #18273

Closed
wants to merge 1 commit into from

Conversation

teh
Copy link
Contributor

@teh teh commented Sep 3, 2016

Useful e.g. to pass GCC through when using theano.

Useful e.g. to pass GCC through when using theano.
@mention-bot
Copy link

@teh, thanks for your PR! By analyzing the annotation information on this pull request, we identified @abbradar, @FRidh and @domenkozar to be potential reviewers

@FRidh FRidh self-assigned this Sep 10, 2016
@FRidh
Copy link
Member

FRidh commented Sep 10, 2016

I like the idea of being able to add other paths, so +1 for that.

However, I am not sure what the right solution is. In this case, Theano needs gcc. We've added stdenv to propagatedBuildInputs, but its not available with python.buildEnv because we filter out the non-Python packages. Furthermore, gcc is not on the PATH of the interpreter either.

Should we actually filter non-Python packages in the first place? The purpose of the buildEnv is that the binaries (including interpreter) can find all Python libraries and therefore all it needs to do is to wrap the binaries setting PYTHONHOME I don't see any point in the filtering. @bennofs, what do you think?

@bennofs
Copy link
Contributor

bennofs commented Sep 10, 2016

@FRidh I'm not sure, but not filtering the results of closePropagation sounds dangerous to me... it seems like that could add a lot of paths to the buildEnv. Not sure if that is actually a concern in practice though.

@FRidh
Copy link
Member

FRidh commented Sep 10, 2016

@bennofs actually, I think it won't. While with Python packages we use propagatedBuildInputs a lot, that is not the case with other dependencies. Those are most often only build dependencies and therefore wouldn't show up in the env.

@teh
Copy link
Contributor Author

teh commented Sep 11, 2016

I wasn't sure either but with the current attempts to keep closure size small (for docker etc) I thought it might be easier for people to build explicit envs over having everything in propagatedBuildInputs

@FRidh
Copy link
Member

FRidh commented Sep 19, 2016

#18696 should work now for you.

@FRidh
Copy link
Member

FRidh commented Mar 22, 2017

In retrospect I don't think #18696 was such a good idea and am leaning more to this original PR instead. We've begun using buildEnv more now in Nixpkgs, and I've seen cases where the eventual environment got quite big as.

Also, @teh, in your case the proper solution is to patch Theano to hardcode the path to g++ / clang++.
Its a matter of adding at default value right here and removing the whole param stuff above it.

@FRidh FRidh reopened this Mar 22, 2017
@teh
Copy link
Contributor Author

teh commented Mar 22, 2017

@FRidh - thanks. Let me know if you want me to rebase or just do the change yourself.

@teh
Copy link
Contributor Author

teh commented Dec 30, 2018

no longer valid

@teh teh closed this Dec 30, 2018
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

5 participants