Fix platform tag logic to generate the same as cpython on AIX#3220
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates maturin’s wheel platform tag generation on AIX to match CPython’s sysconfig.get_platform() behavior, fixing tags that pip previously rejected.
Changes:
- Add an AIX-specific platform tag path using
lslpp -Lqc bos.rteparsing to produce CPython-compatibleaix_{ver}{rel}{tl}_{builddate}_{bitsize}tags. - Introduce a unit-testable parser helper (
aix_tag_from_lslpp_output) and add unit tests covering typical and edge-case outputs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
messense
approved these changes
Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the platform tag logic on AIX to generate the same tag as CPython does.
On AIX, CPython runs
lslpp -Lqc bos.rteand parses the output to extract version information, then builds the tag with formataix_{ver:x}{rel}{tl:02}_{builddate:04}_{bitsize}.See https://github.com/python/cpython/blob/main/Lib/_aix_support.py for the exact implementation.
maturincurrently falls through the POSIX fallback which usesuname()'s release and machine fields, producing tags likeaix_3_00F9D80F4C00(hardware model number) that pip does not recognize.This PR aims to implement the same logic so that wheels are properly tagged and can be used by pip.
Without the fix,
pip installfails withERROR: not a supported wheel on this platform.Added unit tests to validate the parsing.
Also built
maturinwith the fix, generated a small test wheel, installed it with pip, and called it to validate it all works end to end on AIX.