Skip to content

add 'local' as highest precedence architecture for wheel #6565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

dholth
Copy link
Member

@dholth dholth commented Jun 2, 2019

Sometimes it is useful to be able to build a wheel on the local machine that has a higher precedence than a manylinux wheel. If a certain manylinux wheel is broken, you might compile a non-manylinux wheel on the local machine and place it in a directory on $PIP_FIND_LINKS. Then pip would automatically choose the new wheel without requiring an extra argument per package.

The theory of operation is that the contents of a wheel compiled on the "local" machine are more-specific, from the point of view of that machine, than any other wheel.

These tags are supported after this change, on my machine:

[('cp27', 'cp27mu', 'local'),
 ('cp27', 'cp27mu', 'manylinux2010_x86_64'),
 ('cp27', 'cp27mu', 'manylinux1_x86_64'),
 ('cp27', 'cp27mu', 'linux_x86_64'),
 ('cp27', 'none', 'local'),
 ('cp27', 'none', 'manylinux2010_x86_64'),
 ('cp27', 'none', 'manylinux1_x86_64'),
 ('cp27', 'none', 'linux_x86_64'),
 ('py2', 'none', 'local'),
 ('py2', 'none', 'manylinux2010_x86_64'),
 ('py2', 'none', 'manylinux1_x86_64'),
 ('py2', 'none', 'linux_x86_64'),
 ('cp27', 'none', 'any'),
 ('cp2', 'none', 'any'),
 ('py27', 'none', 'any'),
 ('py2', 'none', 'any'),
 ('py26', 'none', 'any'),
 ('py25', 'none', 'any'),
 ('py24', 'none', 'any'),
 ('py23', 'none', 'any'),
 ('py22', 'none', 'any'),
 ('py21', 'none', 'any'),
 ('py20', 'none', 'any')]

References #6523

@pfmoore
Copy link
Member

pfmoore commented Jun 3, 2019

Looks like some tests are failing ("test_manylinuxXXX_is_first" sounds suspiciously like it's the test that is over-specific :-)). It would probably be worth adding another test, test_local_is_first that explicitly documents and asserts that "local" is always available as the most specific tag.

Apart from test details, I'm +1 on this change.

@xavfernandez
Copy link
Member

I would say that PEP 425 (or some other one) would need to be amended first ?

@pfmoore
Copy link
Member

pfmoore commented Jun 3, 2019

Good call. PEP 425 is very vague on the details of valid tags, but as this is a tag with a globally valid meaning (much like "none" and "any") it should be documented as such. If nothing else, that would avoid the interpretation issues that triggered the need for this in the first place.

Side note: IMO PEP 425 could do with a clean-up to clarify as much of the globally common definitions as possible, but I don't think that's something we need to worry about here.

@BrownTruck
Copy link
Contributor

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will be eligible for code review and hopefully merging!

@chrahunt
Copy link
Member

Since we're on the verge of getting rid of this part of pep425tags, I'll close this and we can move the discussion over to pypa/packaging#239.

@chrahunt chrahunt closed this Nov 18, 2019
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Dec 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation needs rebase or merge PR has conflicts with current master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants