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.

Respect python-requires in offline mode (--find-link --no-index)

See original GitHub issue

One 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:closed
  • Created 4 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
pfmoorecommented, Jan 18, 2020

I don’t think that fixes the wider problem

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 point Python-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 checking Python-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.

1reaction
pfmoorecommented, Jan 18, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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