Skip to content
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

gh-102362: Fix macOS version number in result of sysconfig.get_platform() #112942

Merged
merged 1 commit into from Dec 18, 2023

Conversation

ronaldoussoren
Copy link
Contributor

@ronaldoussoren ronaldoussoren commented Dec 10, 2023

Change _osx_support.get_platform_osx() to make sure that the version number in the result includes at least a major and minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting appropriate wheels for installation.

…platform()

Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.
@ronaldoussoren
Copy link
Contributor Author

Pip expects a two digit version, from pip debug:

  cp312-cp312-macosx_14_0_arm64
  cp312-cp312-macosx_14_0_universal2
  cp312-cp312-macosx_13_0_arm64
  cp312-cp312-macosx_13_0_universal2
  cp312-cp312-macosx_12_0_arm64
  cp312-cp312-macosx_12_0_universal2

Note that the list only contains .0 releases for macOS 11 and later, but pypa/packaging#578 will change that.

This PR at least ensures that anyone building with MACOSX_DEPLOYMENT_TARGET=13 will get results from sysconfig.get_platform that can be used in wheel tags, instead having to adjust them manually.

@ned-deily ned-deily merged commit 893c9cc into python:main Dec 18, 2023
35 checks passed
@miss-islington-app
Copy link

Thanks @ronaldoussoren for the PR, and @ned-deily for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@bedevere-app
Copy link

bedevere-app bot commented Dec 18, 2023

GH-113264 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 18, 2023
…platform() (pythonGH-112942)

Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.
(cherry picked from commit 893c9cc)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Dec 18, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 18, 2023
…platform() (pythonGH-112942)

Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.
(cherry picked from commit 893c9cc)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
@bedevere-app
Copy link

bedevere-app bot commented Dec 18, 2023

GH-113265 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Dec 18, 2023
@ned-deily
Copy link
Member

I merged this PR so that it will get exposure in the upcoming 3.13.0a3 release. I'll leave any backports open for @ronaldoussoren's approval.

ronaldoussoren added a commit that referenced this pull request Dec 19, 2023
…_platform() (GH-112942) (#113264)

gh-102362: Fix macOS version number in result of sysconfig.get_platform() (GH-112942)

Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.
(cherry picked from commit 893c9cc)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
ronaldoussoren added a commit that referenced this pull request Dec 19, 2023
…_platform() (GH-112942) (#113265)

gh-102362: Fix macOS version number in result of sysconfig.get_platform() (GH-112942)

Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.
(cherry picked from commit 893c9cc)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
ryan-duve pushed a commit to ryan-duve/cpython that referenced this pull request Dec 26, 2023
…platform() (pythonGH-112942)

Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…platform() (pythonGH-112942)

Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants