@@ -306,6 +306,47 @@ def _custom_manylinux_platforms(arch):
306
306
return arches
307
307
308
308
309
+ def _get_custom_platforms (arch ):
310
+ # type: (str) -> List[str]
311
+ arch_prefix , arch_sep , arch_suffix = arch .partition ('_' )
312
+ if arch .startswith ('macosx' ):
313
+ arches = _mac_platforms (arch )
314
+ elif arch_prefix in ['manylinux2014' , 'manylinux2010' ]:
315
+ arches = _custom_manylinux_platforms (arch )
316
+ elif arch is None :
317
+ arches = []
318
+ if is_manylinux2014_compatible ():
319
+ arches .append ('manylinux2014' + arch_sep + arch_suffix )
320
+ if is_manylinux2010_compatible ():
321
+ arches .append ('manylinux2010' + arch_sep + arch_suffix )
322
+ if is_manylinux1_compatible ():
323
+ arches .append ('manylinux1' + arch_sep + arch_suffix )
324
+ arches .append (arch )
325
+ else :
326
+ arches = [arch ]
327
+ return arches
328
+
329
+
330
+ def _get_platforms ():
331
+ # type: () -> List[str]
332
+ arch = get_platform ()
333
+ arch_prefix , arch_sep , arch_suffix = arch .partition ('_' )
334
+ if arch .startswith ('macosx' ):
335
+ arches = _mac_platforms (arch )
336
+ elif arch_prefix in ['manylinux2014' , 'manylinux2010' ]:
337
+ arches = _custom_manylinux_platforms (arch )
338
+ else :
339
+ arches = []
340
+ if is_manylinux2014_compatible ():
341
+ arches .append ('manylinux2014' + arch_sep + arch_suffix )
342
+ if is_manylinux2010_compatible ():
343
+ arches .append ('manylinux2010' + arch_sep + arch_suffix )
344
+ if is_manylinux1_compatible ():
345
+ arches .append ('manylinux1' + arch_sep + arch_suffix )
346
+ arches .append (arch )
347
+ return arches
348
+
349
+
309
350
def get_supported (
310
351
version = None , # type: Optional[str]
311
352
platform = None , # type: Optional[str]
@@ -353,23 +394,10 @@ def get_supported(
353
394
354
395
abis .append ('none' )
355
396
356
- arch = platform or get_platform ()
357
- arch_prefix , arch_sep , arch_suffix = arch .partition ('_' )
358
- if arch .startswith ('macosx' ):
359
- arches = _mac_platforms (arch )
360
- elif arch_prefix in ['manylinux2014' , 'manylinux2010' ]:
361
- arches = _custom_manylinux_platforms (arch )
362
- elif platform is None :
363
- arches = []
364
- if is_manylinux2014_compatible ():
365
- arches .append ('manylinux2014' + arch_sep + arch_suffix )
366
- if is_manylinux2010_compatible ():
367
- arches .append ('manylinux2010' + arch_sep + arch_suffix )
368
- if is_manylinux1_compatible ():
369
- arches .append ('manylinux1' + arch_sep + arch_suffix )
370
- arches .append (arch )
397
+ if platform :
398
+ arches = _get_custom_platforms (platform )
371
399
else :
372
- arches = [ arch ]
400
+ arches = _get_platforms ()
373
401
374
402
# Current version, current API (built specifically for our Python):
375
403
for abi in abis :
0 commit comments