@@ -137,17 +137,11 @@ def cibuildwheel_run(
137
137
return wheels
138
138
139
139
140
- def _get_arm64_macosx_deployment_target ( macosx_deployment_target : str ) -> str :
140
+ def _floor_macosx_deployment_target ( * args : str ) -> str :
141
141
"""
142
- The first version of macOS that supports arm is 11.0. So the wheel tag
143
- cannot contain an earlier deployment target, even if
144
- MACOSX_DEPLOYMENT_TARGET sets it.
142
+ Make sure a deployment target is not less than some value.
145
143
"""
146
- version_tuple = tuple (map (int , macosx_deployment_target .split ("." )))
147
- if version_tuple <= (11 , 0 ):
148
- return "11.0"
149
- else :
150
- return macosx_deployment_target
144
+ return max (args , key = lambda x : tuple (map (int , x .split ("." ))))
151
145
152
146
153
147
def expected_wheels (
@@ -282,11 +276,22 @@ def expected_wheels(
282
276
283
277
elif platform == "macos" :
284
278
if machine_arch == "arm64" :
285
- arm64_macosx_deployment_target = _get_arm64_macosx_deployment_target (
286
- macosx_deployment_target
279
+ arm64_macosx_deployment_target = _floor_macosx_deployment_target (
280
+ macosx_deployment_target , "11.0"
287
281
)
288
282
platform_tags = [f'macosx_{ arm64_macosx_deployment_target .replace ("." , "_" )} _arm64' ]
289
283
else :
284
+ if python_abi_tag .startswith ("pp" ) and not python_abi_tag .startswith (
285
+ ("pp37" , "pp38" )
286
+ ):
287
+ macosx_deployment_target = _floor_macosx_deployment_target (
288
+ macosx_deployment_target , "10.15"
289
+ )
290
+ elif python_abi_tag .startswith ("cp3.13" ):
291
+ macosx_deployment_target = _floor_macosx_deployment_target (
292
+ macosx_deployment_target , "10.13"
293
+ )
294
+
290
295
platform_tags = [f'macosx_{ macosx_deployment_target .replace ("." , "_" )} _x86_64' ]
291
296
292
297
if include_universal2 :
0 commit comments