Make --no-binary build a wheel locally instead of calling setup.py install
See original GitHub issueThis 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:
- add a new feature flag
--use-feature=always-install-via-wheel
, that is intended to become the default and only mechanism in the future - when
--no-binary
is used without the feature flag, emit a deprecation warning about the fallback tosetup.py install
- when
--no-binary
is used with the feature flag, build a wheel from the sdist (via PEP 517 orsetup.py bdist_wheel
) then install it - when
--no-binary
is used with the feature flag, the wheel that was built locally is cached (unless the cache is disabled) - since
--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 - deprecate
--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
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
What Are Python Wheels and Why Should You Care?
Wheels make the end-to-end installation of Python packages faster for two reasons: All else being equal, wheels are typically smaller in size than...
Read more >Pip install from source without building a wheel - Stack Overflow
You can run $ pip install mypackage/ --no-cache-dir --no-binary=mypackage. to skip wheel building (assuming mypackage is actually your ...
Read more >pip wheel - pip documentation v22.3.1
Build Wheel archives for your requirements and dependencies. ... options to be supplied to the setup.py call before the install or bdist_wheel command....
Read more >wheel Documentation - Read the Docs
The wheel will go to dist/yourproject-<tags>.whl. If you want to make universal (Python 2/3 compatible, pure Python) wheels, add the following ...
Read more >pip wheel — pip 10.0.0.dev0 documentation
In order for pip to build a wheel, setup.py must implement the bdist_wheel command ... This command must create a wheel compatible with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s headed in that direction, but there’s still a few projects that don’t work that way.
I’d recommend doing something different:
pip download --no-binary :all:
.pip install --no-index --find-link wheelhouse-path package1 package2
.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. 😃