Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-38021: Modify AIX platform_tag so it provides PEP425 needs #17303
Conversation
…identification
This comment has been minimized.
This comment has been minimized.
Adding @brettcannon and @ncoghlan to review in particular regarding input from PyPA (see bpo issue comments) |
This comment has been minimized.
This comment has been minimized.
I'm not the right person for distutils stuff. |
This comment has been minimized.
This comment has been minimized.
Additional comment here: https://bugs.python.org/issue38021#msg357236 |
Change field seperator in tag from to ``'-'`` to be similiar with other tags
This comment has been minimized.
This comment has been minimized.
Hoping for a final review. :) Entering the year-end dash at work, so I may be slow to reply. |
This comment has been minimized.
This comment has been minimized.
@aixtools Given that, I'm going to go ahead and make the documentation changes necessary to mark this as a 3.9+ only feature. |
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. |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Dec 8, 2019
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 |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Dec 8, 2019
Thanks for making the requested changes! @ncoghlan: please review the changes made to this pull request. |
This comment has been minimized.
This comment has been minimized.
@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. |
This comment has been minimized.
This comment has been minimized.
Thanks! |
bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (pythonGH-17303)
aixtools commentedNov 21, 2019
•
edited
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