Skip to content

Commit 62bafb2

Browse files
committed
BUG: also handle macOS 10.X versions correctly
This is a follow-up to mesonbuildgh-161
1 parent 25b8d28 commit 62bafb2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

mesonpy/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,11 @@ def platform_tag(self) -> str:
275275
# latter specifies the target macOS version Python was built
276276
# against.
277277
parts[1] = platform.mac_ver()[0]
278-
# Only pick up the major version
279-
# https://github.com/FFY00/meson-python/issues/160
280-
parts[1] = parts[1].split('.')[0]
278+
if parts[1] >= '11':
279+
# Only pick up the major version, which changed from 10.X
280+
# to X.0 from macOS 11 onwards. See
281+
# https://github.com/FFY00/meson-python/issues/160
282+
parts[1] = parts[1].split('.')[0]
281283

282284
if parts[1] in ('11', '12'):
283285
# Workaround for bug where pypa/packaging does not consider macOS

0 commit comments

Comments
 (0)