-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
bpo-38021: Modify AIX platform_tag so it provides PEP425 needs #17303
Conversation
Adding @brettcannon and @ncoghlan to review in particular regarding input from PyPA (see bpo issue comments) |
I'm not the right person for distutils stuff. |
Additional comment here: https://bugs.python.org/issue38021#msg357236 |
Change field seperator in tag from to ``'-'`` to be similiar with other tags
Hoping for a final review. :) Entering the year-end dash at work, so I may be slow to reply. |
@aixtools Given that, I'm going to go ahead and make the documentation changes necessary to mark this as a 3.9+ only feature. |
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'm in the process of making some direct edits for documentation wording and markup changes, but there's a more substantial change needed before we accept the PR: to minimise compatibility risks, the platform prefix should remain in lowercase, and any code that cares about the rest of the formatting will need to switch based on the number of hyphens found.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again - both in code and docs. AIX tag is lowercase. Shall adjust my PR in pypa to switch based on the number of hyphens found. |
Thanks for making the requested changes! @ncoghlan: please review the changes made to this pull request. |
@aixtools When I sent my last review, it was missing some cosmetic comments related to the error handling logic in the _aix_support module. Since I missed sending those last time, I went ahead and made them directly, rather than taking you through yet another review-edit-review cycle. |
Thanks! |
…GH-17303) Provides a richer platform tag for AIX that we expect to be sufficient for PEP 425 binary distribution identification. Any backports to earlier Python versions will be handled via setuptools. Patch by Michael Felt.
PEP425 defines the platform_tag as whatever sysconfig.get_platform() (and distutils.util.get_platform() returns). HOWEVER, for a platform_tag to be useable it needs to satisfy a number of conditions.
The main condition is to provide sufficient detail so that binary distributions (e.g., eggs and wheels)
can be applied, accepted or rejected by distribution tools (e.g, pip and wheel).
This PR specifies the AIX platform tag be specified (effectively) as:
"AIX-{:04d}-{:04d}-{:2d}".format(vrtl,builddate,bitsize)
e.g., AIX 5.3 TL7 SP0 would be identified as: "AIX-5307-0747-32" and "AIX-5307-0747-64" for 32bit and 64bit builds, respectively.
Most of the information needed to provide a "pep425 build tag" is already available:
sysconfig.get_config_var("GNU_BUILD_TYPE") and sys.maxsize.
Comparable to how macos can determine it build-system characteristics one additional variable is needed: sysconfig.get_config_var("AIX_BUILDDATE").
As AIX guarantees application binary compatibility from old to new the run-time value of the get_platform() can be compared with the aix_buildtag() to determine whether a bdist is acceptable for installation, or not.
https://bugs.python.org/issue38021