-
Notifications
You must be signed in to change notification settings - Fork 264
Provide a way to pass custom flags to pip wheel #120
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
Comments
Hmm, interesting. As I understand it, the build isolation features in pip are designed to encourage reproducible builds among python packages i.e. remove dependency on stuff that just happens to be there at build time. So the isolation means that only the stuff declared is available during the build. Now in your case, the BEFORE_BUILD installed numpy isn't available to the build because of this. (Just thinking aloud, correct me if I'm wrong!). An option to add flags could be possible, but I have a couple questions
Thanks |
@joerick - for packages that have C extensions that use Numpy, the usual approach is to build wheels against the oldest supported Numpy version and the wheel will then work with all versions more recent that this. If you do the opposite, and e.g. compile fast-histogram against Numpy 1.15 and then try and install Numpy 1.12, it work work (Numpy will complain that the ABI version it was compiled against - 0xc, is more recent than the installed version of Numpy - 0xa). This is why I need to install an old version of Numpy before the build and why I need to disable build isolation. Basically, currently with cibuildwheel we can only build wheels that work with the latest version of Numpy, not older versions. |
@astrofrog did you try specifying the numpy version you want in the
(That said, the use of build isolation in pip looks like it's reducing BEFORE_BUILD's usefulness. Since that's the way things are going (after PEP 518), I don't want to blanket disable build isolation if I can help it. Though I can see an option being useful in the transition period. interesting reading at scipy/scipy#8734) |
@joerick - ah interesting, I'll take a look at the scipy and pip discussions. |
Now that I understand PEP517/PEP518 better, I'm going to close this since the build isolation is indeed desirable! |
Uh oh!
There was an error while loading. Please reload this page.
I maintain some packages (e.g. fast-histogram) for which I make use of
pyproject.toml
to define build-time dependencies (as per the new PEP 518):Now cibuildwheel does the following:
The issue is that pip wheel by default will actually re-install numpy because it's defined in
pyproject.toml
and will actually compile the package over a more recent version of numpy. I'm not sure of the motivation for this behavior, but the solution is to runpip wheel
with the--no-build-isolation
option.So I think either
--no-build-isolation
should be added by default to thepip wheel
commands here, or if you don't agree, it would be nice to at least have a way for users to add flags topip wheel
(the first is in my opinion the better option because, in the same way that you use--no-deps
to ignore install_requires, you basically want to force pip to really not install any dependencies if apyproject.toml
file is present)The text was updated successfully, but these errors were encountered: