-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Implement PEP 513 #3446
Implement PEP 513 #3446
Conversation
@rmcgibbo: It would be good to also add a check to
|
@njsmith do you think pip is really the right place for that? (It's also worth mentioning as a stopgap, that you can get the linux32 behavior by prefixing commands with |
# Check for presence of _manylinux module | ||
try: | ||
import _manylinux | ||
return bool(_manylinux.manylinux1_compatible) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe safer as:
try:
import _manylinux
except (ImportError, AttributeError):
# Fall through to heuristic check below
pass
else:
return bool(_manylinux.manylinux1_compatible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this changes the semantics -- the reason it's written that way in the PEP is that it's legal to have a _manylinux
module that doesn't define a manylinux1_compatible
attribute. (Hence the AttributeError
check.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason _manylinux
is not vendored?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, _manylinux
is basically a config file that may be added to python by a distributor, as a way of providing information about a particular python install to pip. It's not an actual module with, like, code in it. So vendoring it would defeat the purpose :-). See PEP 513 for details.
The right place is distutils, but distutils is stuck on the cpython release
|
@rmcgibbo: Looks like you have some pep8 failures |
Remaining Travis failures appear to just be PyPI being flaky. |
I restarted the ones that had failed. |
Okay, now that the travis checkmark is green, is there anything special I have to do for the "reviewable" hook? |
""" | ||
Test that manylinux1 is enabled on wide unicode linux_x86_64 | ||
""" | ||
assert pep425tags.is_manylinux1_compatible() is True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the is True
?
|
||
# "wide" Unicode mode is mandatory (always true on CPython 3.3+) | ||
if sys.maxunicode <= 0xFFFF: | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only change needed to handle this last round of PEP updates is to delete this unicode check
My bad -- you also need to remove the maxunicode test :-) |
@rmcgibbo: pep8 failures (and some spurious failures due to pypi flakiness) |
I addressed the remaining CI failures in #3497. |
Thanks @ogrisel for picking this up while I finished my Ph.D. thesis. I'll close this and we can continue with your PR. |
This PR implements PEP 513 (the
manylinux1
PEP approved on distutils-sig last week). The code was written mostly in the PEP by @njsmith. It's implemented as an extra part ofpep425tags.get_supported
that, when running on Linux, checks if the current machine is manylinux1 compatible if so, adds it to the returned list of supported tags.