@@ -261,6 +261,25 @@ def get_all_minor_versions_as_strings(version_info):
261
261
return versions
262
262
263
263
264
+ def _mac_platforms (arch ):
265
+ # type: (str) -> List[str]
266
+ match = _osx_arch_pat .match (arch )
267
+ if match :
268
+ name , major , minor , actual_arch = match .groups ()
269
+ mac_version = (int (major ), int (minor ))
270
+ mac_arches = list (mac_platforms (mac_version , actual_arch ))
271
+ arches = [
272
+ # Technically a user could've passed something only
273
+ # starting with 'macosx', not necessarily macosx_.
274
+ '{}_{}' .format (name , arch [len ('macosx_' ):])
275
+ for arch in mac_arches
276
+ ]
277
+ else :
278
+ # arch pattern didn't match (?!)
279
+ arches = [arch ]
280
+ return arches
281
+
282
+
264
283
def get_supported (
265
284
version = None , # type: Optional[str]
266
285
platform = None , # type: Optional[str]
@@ -311,20 +330,7 @@ def get_supported(
311
330
arch = platform or get_platform ()
312
331
arch_prefix , arch_sep , arch_suffix = arch .partition ('_' )
313
332
if arch .startswith ('macosx' ):
314
- match = _osx_arch_pat .match (arch )
315
- if match :
316
- name , major , minor , actual_arch = match .groups ()
317
- mac_version = (int (major ), int (minor ))
318
- mac_arches = list (mac_platforms (mac_version , actual_arch ))
319
- arches = [
320
- # Technically a user could've passed something only
321
- # starting with 'macosx', not necessarily macosx_.
322
- '{}_{}' .format (name , arch [len ('macosx_' ):])
323
- for arch in mac_arches
324
- ]
325
- else :
326
- # arch pattern didn't match (?!)
327
- arches = [arch ]
333
+ arches = _mac_platforms (arch )
328
334
elif arch_prefix == 'manylinux2014' :
329
335
arches = [arch ]
330
336
# manylinux1/manylinux2010 wheels run on most manylinux2014 systems
0 commit comments