@@ -280,6 +280,32 @@ def _mac_platforms(arch):
280
280
return arches
281
281
282
282
283
+ def _custom_manylinux_platforms (arch ):
284
+ # type: (str) -> List[str]
285
+ arches = [arch ]
286
+
287
+ arch_prefix , arch_sep , arch_suffix = arch .partition ('_' )
288
+
289
+ if arch_prefix == 'manylinux2014' :
290
+ # manylinux1/manylinux2010 wheels run on most manylinux2014 systems
291
+ # with the exception of wheels depending on ncurses. PEP 599 states
292
+ # manylinux1/manylinux2010 wheels should be considered
293
+ # manylinux2014 wheels:
294
+ # https://www.python.org/dev/peps/pep-0599/#backwards-compatibility-with-manylinux2010-wheels
295
+ if arch_suffix in {'i686' , 'x86_64' }:
296
+ arches .append ('manylinux2010' + arch_sep + arch_suffix )
297
+ arches .append ('manylinux1' + arch_sep + arch_suffix )
298
+
299
+ elif arch_prefix == 'manylinux2010' :
300
+ # manylinux1 wheels run on most manylinux2010 systems with the
301
+ # exception of wheels depending on ncurses. PEP 571 states
302
+ # manylinux1 wheels should be considered manylinux2010 wheels:
303
+ # https://www.python.org/dev/peps/pep-0571/#backwards-compatibility-with-manylinux1-wheels
304
+ arches .append ('manylinux1' + arch_sep + arch_suffix )
305
+
306
+ return arches
307
+
308
+
283
309
def get_supported (
284
310
version = None , # type: Optional[str]
285
311
platform = None , # type: Optional[str]
@@ -331,22 +357,8 @@ def get_supported(
331
357
arch_prefix , arch_sep , arch_suffix = arch .partition ('_' )
332
358
if arch .startswith ('macosx' ):
333
359
arches = _mac_platforms (arch )
334
- elif arch_prefix == 'manylinux2014' :
335
- arches = [arch ]
336
- # manylinux1/manylinux2010 wheels run on most manylinux2014 systems
337
- # with the exception of wheels depending on ncurses. PEP 599 states
338
- # manylinux1/manylinux2010 wheels should be considered
339
- # manylinux2014 wheels:
340
- # https://www.python.org/dev/peps/pep-0599/#backwards-compatibility-with-manylinux2010-wheels
341
- if arch_suffix in {'i686' , 'x86_64' }:
342
- arches .append ('manylinux2010' + arch_sep + arch_suffix )
343
- arches .append ('manylinux1' + arch_sep + arch_suffix )
344
- elif arch_prefix == 'manylinux2010' :
345
- # manylinux1 wheels run on most manylinux2010 systems with the
346
- # exception of wheels depending on ncurses. PEP 571 states
347
- # manylinux1 wheels should be considered manylinux2010 wheels:
348
- # https://www.python.org/dev/peps/pep-0571/#backwards-compatibility-with-manylinux1-wheels
349
- arches = [arch , 'manylinux1' + arch_sep + arch_suffix ]
360
+ elif arch_prefix in ['manylinux2014' , 'manylinux2010' ]:
361
+ arches = _custom_manylinux_platforms (arch )
350
362
elif platform is None :
351
363
arches = []
352
364
if is_manylinux2014_compatible ():
0 commit comments