Skip to content

Commit 25b8d28

Browse files
committed
BUG: ignore macOS minor version
Signed-off-by: Filipe Laíns <[email protected]>
1 parent 5b118fe commit 25b8d28

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

mesonpy/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ 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]
278281

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

tests/test_wheel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
platform_ = sysconfig.get_platform()
5252
if platform.system() == 'Darwin':
5353
parts = platform_.split('-')
54-
parts[1] = platform.mac_ver()[0]
54+
parts[1] = platform.mac_ver()[0].split('.')[0]
55+
if parts[1] in ('11', '12'):
56+
parts[1] += '.0'
5557
platform_ = '-'.join(parts)
5658
PLATFORM_TAG = platform_.replace('-', '_').replace('.', '_')
5759

0 commit comments

Comments
 (0)