question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make --no-binary build a wheel locally instead of calling setup.py install

See original GitHub issue

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:

  • 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 to setup.py install
  • when --no-binary is used with the feature flag, build a wheel from the sdist (via PEP 517 or setup.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 the install command, as well as in requirement.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:closed
  • Created 2 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
pradyunsgcommented, May 4, 2021

Is Python packaging at the stage where all installations are going via an intermediate wheel stage at this point?

It’s headed in that direction, but there’s still a few projects that don’t work that way.

1reaction
pradyunsgcommented, May 2, 2021

I’d recommend doing something different:

  • pip download --no-binary :all:.
  • Use pypa/build (pip install build) and build the packages into a “wheelhouse” using that (and not pip wheel).
  • You can pip install exactly as described or even install from subsets, like 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. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found