Skip to content

Commit d125185

Browse files
committed
tags: accept mac tags without minor versions
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent 2bd5da3 commit d125185

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packaging/tags.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,16 @@ def mac_platforms(
398398
compat_version = major_version, 0
399399
binary_formats = _mac_binary_formats(compat_version, arch)
400400
for binary_format in binary_formats:
401-
yield "macosx_{major}_{minor}_{binary_format}".format(
402-
major=major_version, minor=0, binary_format=binary_format
401+
yield "macosx_{major}_{binary_format}".format(
402+
major=major_version, binary_format=binary_format
403403
)
404+
# Mac OS 11 and 12 seem to omit the minor version, we will keep
405+
# them for backwards compatibility and avoid generating tags
406+
# with it in the future
407+
if version <= (12, 0):
408+
yield "macosx_{major}_{minor}_{binary_format}".format(
409+
major=major_version, minor=0, binary_format=binary_format
410+
)
404411

405412
if version >= (11, 0):
406413
# Mac OS 11 on x86_64 is compatible with binaries from previous releases.

0 commit comments

Comments
 (0)