-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Make --no-binary build a wheel locally instead of calling setup.py install #9769
Comments
Since we want to deprecate the second meaning I'd suggest to add two transitional (and incompatible) feature flags: In pip 21.1, there would be no behavior change but:
In pip 21.2:
In pip 21.3 The
|
That sounds good overall! I only disagree on the timelines. We'd need longer timelines for the no-setup.py-install change too. Lots of folks are depending on the fact that they can somehow invoke setup.py install still, and we have to see what their use cases are before we say whether things will break or not. I do think that removing things is the best way to get people to react tho, as long as we have an escape hatch that goes away in 6 months. And, also, regarding the timeline 21.1 is like, this weekend or the next. And finally, we usually need to wait 6 months before changing the default after first communicating a change; per our deprecation policy. |
@xavfernandez thanks a lot for looking in details into this issue ! I think I initially considered something close to what you propose but then found a roadblock. I'll look again. Have you considered the fact that, currently, using
Additionally, it also influences use of the wheel cache (#9162). When |
Fair point, I forgot about our 6 months policy 😅 . The flags and deprecation warning would be introduced in version N (possibly 21.1 or the next), the behavior change would happen in version N+2 and flags could be definitely removed in N+4.
Since it currently disables the wheel building, it currently has no impact on wheel caching right ? So from my point of view, there is no deprecation needed on that front. But I totally agree with you on the fact that
This seems strange since In pip 21.1, we add two transitional (and incompatible) feature flags:
In pip 21.3:
In pip 22.1 |
Apologies in advance for the potentially off-topic question. I am really optimistic about a world where it is possible to always install from I'm hopeful that it would eventually enable a workflow such as this:
This would allow for the use of third-party Am I correct in my understanding here? Would this work for all packages, or only packages that have |
I'd recommend doing something different:
That's effectively what the reproducible wheels project is going to be doing pretty soon: https://reproduciblewheels.com/ This also gives you a lot more control over the build pipeline, since you're invoking build, which has a CLI for simple use cases and provides an API for advanced use cases. OTOH, if you don't need careful control over the isolated build environments, then, yes, that should work fine. :) |
Thanks for the tip. Seems sensible! Is that going to be able to always build |
I'm not sure how a package author could not "setup their package for wheels by default". They'd have to actively go out of their way to make it impossible to build wheels. (Of course, that's assuming you are able to install the package - if you;re missing a C compiler and the package includes C code, you won't be able to build a wheel, but you won't be able to install the package without a wheel either...) |
Thats great! Yes, I'm assuming working packages that are I wasn't sure if PEP-517 required |
It's headed in that direction, but there's still a few projects that don't work that way. |
It has been suggested that sdists installed with "setup.py install" could be used for projects that need to include symlinks, since the wheel format does not allow them. The change in workflow to create a wheel prior to installation will break symlinks. Is there a way that can be addressed? |
This is one of a series of deprecations meant to collect feedback on the ultimate goal of always installing source distributions by first building a wheel and then installing from it.
This is made with the following changes:
--use-feature=always-install-via-wheel
, that is intended to become the default and only mechanism in the future--no-binary
is used without the feature flag, emit a deprecation warning about the fallback tosetup.py install
--no-binary
is used with the feature flag, build a wheel from the sdist (via PEP 517 orsetup.py bdist_wheel
) then install it--no-binary
is used with the feature flag, the wheel that was built locally is cached (unless the cache is disabled)--install-option
,--build-option
and--global-option
imply--no-binary
, the deprecation warning will be emitted when these options are used without the feature flag--install-option
allow using--build-option
in theinstall
command, as well as inrequirement.txt
lines, as a transitory mechanism until the ecosystem supports PEP 517 config settings, which are meant to replace both--build-options
and--global-options
Towards #8102
The text was updated successfully, but these errors were encountered: