Subsequent sdist runs are reusing an old, cached wheel
See original GitHub issueTypically during development, your package’s version doesn’t change and pip will install a cached wheel built from an older sdist. For example:
nox > python -m pip install --constraint=.nox/unit-3-8-sdist/tmp/requirements.txt file:///Users/brechtm/Documents/Code/rinohtype/dist/rinohtype-0.5.3.tar.gz#egg=rinohtype
Collecting rinohtype
Using cached rinohtype-0.5.3-py3-none-any.whl
A solution could be to pass --no-cache-dir
to pip when installing the package, though that may cause issues with older pip versions.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Wheel cache is not forward/backward compatible between ...
Installing packages and having the resulting wheels go into a cache dir with pip 22.3 produces a cache that appears to be ignored...
Read more >Prevent pip from caching a package - python - Stack Overflow
These post-install and post-develop triggers run fine if I install the sdist, but if I compile the package to a wheel, they do...
Read more >setup.py (legacy) - pip documentation v22.3.1
The built wheel is cached locally by pip to avoid repeated identical builds. If this wheel generation fails, pip runs setup.py clean to...
Read more >setuptools-scm - PyPI
If your project needs to support build from sdist on older versions of ... the build cache and triggers the long-running pip install...
Read more >pip install — pip 10.0.0.dev0 documentation
When no wheels are found for an sdist, pip will attempt to build a wheel automatically and insert it into the wheel cache....
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
Fixed in #523
When installing from an sdist, pip will first build a wheel from it. That wheel is cached, and reused when installing from an sdist with the same name/version. When you’re doing development, the package version typically doesn’t change, so you end up testing against an old version of your source code.
Hence, to reproduce: