-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
_osx_support.get_platform_osx()
does not always return the minor release number
#102362
Comments
It seems to me that TARGET without minor release suggests that minor release number is not relevant. I have no thought on the other case. |
Agreed, it shouldn't be relevant. The reason I looked into this is because a wheel file I'm generating is producing this error: If I manually rename it the file to add e.g. |
May be related: pypa/wheel#385 (comment) |
…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.
I've added a PR that will add '.0' to the version when MACOSX_DEPLOYMENT_TARGET is set to just a major version. The PR is labelled for back port to 3.11 and 3.12, but I'm not sure if this is a change that is suitable for back ports.
|
@ned-deily, what's your opionion on this (both the change to make sure that the platform version includes at least a major and minor version and back porting this change)? |
I think this is a long-standing bug, ever since Apple changed the semantics of macOS release numbers with macOS 11, and this should be the least-disruptive fix for it. The only gotcha I can think of is if the standard lib |
…rm() (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.
…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>
…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>
…_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>
The public interface for this is I'll merge the back port to 3.11 as well. The most because this fixes a bug: the result of |
…_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>
_osx_support.get_platform_osx()
sometimes does not return the minor release number_osx_support.get_platform_osx()
does not always return the minor release number
…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.
…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.
…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.
_osx_support.get_platform_osx()
, particularly when called fromsysconfig.get_platform()
, might not return the minor release number. This seems to be because theMACOSX_DEPLOYMENT_TARGET
environment variable will be used instead (if present), which may or may not include a minor version number.E.g. on macOS 12.6 with
MACOSX_DEPLOYMENT_TARGET=12
:Perhaps
release = macver
could be switched torelease = macrelease
here so that the internal_get_system_version()
will be used instead?Linked PRs
The text was updated successfully, but these errors were encountered: