Respect python-requires in offline mode (--find-link --no-index)
See original GitHub issueOne way (and before the rewrite release the only way) to bootstrap a virtual environment in an offline environment is to point pip to some bundled wheels via the --find-links
parameter. The problem is that if this folder contains both wheels that support the target environment and wheels that don’t (e.g. with setuptools 45 dropping python 2), pip does not pick the last supported version of a package, but instead picks the highest version, and then fails at install time.
Triggered by https://github.com/pypa/virtualenv/issues/1496.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
No results found
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 FreeTop 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
Top GitHub Comments
It doesn’t. And it doesn’t make any difference when a sdist is available, as the fact that the tag doesn’t cover
py2
just means that the sdist will be used (at which pointPython-Requires
kicks in). But none of that is IMO any reason not to tag the wheel correctly.IMO,
Python-Requires
should be handled by the resolver, as this issue suggests, so that only versions that support the Python version being used are considered. But doing so has a cost, as checkingPython-Requires
can need anything up to a full build. So having as many other indications that a file isn’t relevant for the current interpreter is still useful.@sbidoul Good idea, As long as there’s no local sdist, and the PyPI files have the correct
data-requires-python
tag (which it does) then this should be a reasonable fix.