-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
Python: split buildPythonPackage into two functions #18143
Conversation
@FRidh, thanks for your PR! By analyzing the annotation information on this pull request, we identified @domenkozar, @adnelson and @abbradar to be potential reviewers |
031d0d0
to
23dae99
Compare
Packages to convert (see #17679):
|
Can we agree on the name of the functions? I need to know this before going any further. If we agree I'll fix the whole list and then we should be able to make it in before we branch tomorrow. |
@FRidh I like the idea to provide a custom mkDerivation. |
a4b5e3b
to
5d85100
Compare
@layus Thanks for the feedback and good point. I hope we eventually have `python.mkDerivation' like is now the case with Haskell and therefore chose that name. But changing it is no problem. |
Yes, python.mkDerivation looks good at first, but if people do like below, then the ambiguity persists :-).
|
@FRidh that's great (and will a good answer to a question I saw recently on the ml http://lists.science.uu.nl/pipermail/nix-dev/2016-August/021466.html). I do not have a strong opinion about
That said, I have no objection calling the function I will try have a closer look later on the whole PR later today. |
Yeah I second the opposition of |
@@ -536,6 +536,7 @@ All parameters from `mkDerivation` function are still supported. | |||
* `installFlags`: A list of strings. Arguments to be passed to `pip install`. To pass options to `python setup.py install`, use `--install-option`. E.g., `installFlags=["--install-option='--cpp_implementation'"]. | |||
* `format`: Format of the source. Options are `setup` for when the source has a `setup.py` and `setuptools` is used to build a wheel, and `wheel` in case the source is already a binary wheel. The default value is `setup`. | |||
* `catchConflicts` If `true`, abort package build if a package name appears more than once in dependency tree. Default is `true`. | |||
* `checkInputs` Dependencies needed for running the `checkPhase`. These are added to `buildInputs` when `doCheck = true`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this conceptually, but is there really anything wrong with just deeming these to be buildInputs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. As you can read, they are put together anyway. It might save some building when you disable tests. Furthermore, I'm still playing with the idea of separating the building and installing/testing in two separate derivations.
Thanks for the feedback. A bit more about the naming. Looking at what the current |
f342972
to
77b8bed
Compare
77b8bed
to
ae43d07
Compare
1. mkDerivation which is used when the source is without setup.py and not a wheel 2. buildPythonPackage which is used as before and calls mkDerivation
ae43d07
to
9a85190
Compare
Motivation for this change
Currently we have only
buildPythonPackage
for setuptools and wheels installations. However, we still have quite some packages that do not use setuptools or wheels. This PR provides another function,mkPythonDerivation
, thatpythonPath
sobuildEnv
will functionpython
interpreter which was typically missingthus solving issues like described in #17679.
A rebuild is needed.