From d1251855b9b7f65d0064609473a940ea241d1fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 20 Jul 2022 19:20:31 +0100 Subject: [PATCH] tags: accept mac tags without minor versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe LaĆ­ns --- packaging/tags.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packaging/tags.py b/packaging/tags.py index 5b6c5ffd0..9bbe991f4 100644 --- a/packaging/tags.py +++ b/packaging/tags.py @@ -398,9 +398,16 @@ def mac_platforms( compat_version = major_version, 0 binary_formats = _mac_binary_formats(compat_version, arch) for binary_format in binary_formats: - yield "macosx_{major}_{minor}_{binary_format}".format( - major=major_version, minor=0, binary_format=binary_format + yield "macosx_{major}_{binary_format}".format( + major=major_version, binary_format=binary_format ) + # Mac OS 11 and 12 seem to omit the minor version, we will keep + # them for backwards compatibility and avoid generating tags + # with it in the future + if version <= (12, 0): + yield "macosx_{major}_{minor}_{binary_format}".format( + major=major_version, minor=0, binary_format=binary_format + ) if version >= (11, 0): # Mac OS 11 on x86_64 is compatible with binaries from previous releases.