Skip to content

_osx_support.get_platform_osx() does not always return the minor release number #102362

Closed
@keleftheriou

Description

@keleftheriou

_osx_support.get_platform_osx(), particularly when called from sysconfig.get_platform(), might not return the minor release number. This seems to be because the MACOSX_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:

>>> _osx_support.get_platform_osx({}, "", "", "")
('macosx', '12.6', '')
>>> _osx_support.get_platform_osx(sysconfig.get_config_vars(), "", "", "")
('macosx', '12', '')

Perhaps release = macver could be switched to release = macrelease here so that the internal _get_system_version() will be used instead?

Linked PRs

Metadata

Metadata

Assignees

Labels

OS-mactype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions