util.get_host_platform: use sysconfig.get_platform (v2)#104
Merged
util.get_host_platform: use sysconfig.get_platform (v2)#104
Conversation
sysconfig module has a copy of this function in `sysconfig.get_platform` and would be better to use that directly. This should help distributors to patch that function in a single place, ie sysconfig. Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com> Signed-off-by: Naveen M K <naveen521kk@gmail.com>
While get_host_platform() in distutils and sysconfig.get_platform() are more or less the same for the same Python version, this extracted distutils containing the Python 3.9 logic was exposed via setuptools to users using older Python versions. To avoid any breakage make sure to restore the 3.9 behaviour for 3.7/3.8. For any newer version get_host_platform() just delegates to sysconfig as before. Also partly revert the docstring to be more generic and no longer mention sysconfig.get_platform(), so no one depends on them matching.
Contributor
Author
|
(btw, I'd totally understand if you delay any mingw targeted patches until the setuptools transition pains are dealt with) |
jaraco
approved these changes
Jan 22, 2022
Member
jaraco
left a comment
There was a problem hiding this comment.
LGTM. Thanks for looking into this and helping with the consolidation.
This was referenced Jan 31, 2022
This was referenced Feb 7, 2022
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.
This continues #102 but tries to address the concerns raised in #102 (comment), see the second commit for any differences.
(I didn't add a test for aix since mocking seemed overly complex :/)