File tree 2 files changed +7
-4
lines changed 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -275,9 +275,11 @@ def platform_tag(self) -> str:
275
275
# latter specifies the target macOS version Python was built
276
276
# against.
277
277
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 ]
281
283
282
284
if parts [1 ] in ('11' , '12' ):
283
285
# Workaround for bug where pypa/packaging does not consider macOS
Original file line number Diff line number Diff line change 51
51
platform_ = sysconfig .get_platform ()
52
52
if platform .system () == 'Darwin' :
53
53
parts = platform_ .split ('-' )
54
- parts [1 ] = platform .mac_ver ()[0 ].split ('.' )[0 ]
54
+ if parts [1 ] >= '11' :
55
+ parts [1 ] = platform .mac_ver ()[0 ].split ('.' )[0 ]
55
56
if parts [1 ] in ('11' , '12' ):
56
57
parts [1 ] += '.0'
57
58
platform_ = '-' .join (parts )
You can’t perform that action at this time.
0 commit comments