33import textwrap
44from os import PathLike
55from pathlib import Path , PurePath
6- from typing import List , NamedTuple , Union
6+ from typing import List , NamedTuple , Union , Dict
77
88from .docker_container import DockerContainer
99from .logger import log
@@ -24,42 +24,13 @@ def path(self):
2424
2525
2626def get_python_configurations (
27- build_selector : BuildSelector , architectures : List [Architecture ]
27+ python_configs : List [Dict [str , str ]],
28+ build_selector : BuildSelector ,
29+ architectures : List [Architecture ]
2830) -> List [PythonConfiguration ]:
29- python_configurations = [
30- PythonConfiguration (version = '2.7' , identifier = 'cp27-manylinux_x86_64' , path_str = '/opt/python/cp27-cp27m' ),
31- PythonConfiguration (version = '2.7' , identifier = 'cp27-manylinux_x86_64' , path_str = '/opt/python/cp27-cp27mu' ),
32- PythonConfiguration (version = '3.5' , identifier = 'cp35-manylinux_x86_64' , path_str = '/opt/python/cp35-cp35m' ),
33- PythonConfiguration (version = '3.6' , identifier = 'cp36-manylinux_x86_64' , path_str = '/opt/python/cp36-cp36m' ),
34- PythonConfiguration (version = '3.7' , identifier = 'cp37-manylinux_x86_64' , path_str = '/opt/python/cp37-cp37m' ),
35- PythonConfiguration (version = '3.8' , identifier = 'cp38-manylinux_x86_64' , path_str = '/opt/python/cp38-cp38' ),
36- PythonConfiguration (version = '3.9' , identifier = 'cp39-manylinux_x86_64' , path_str = '/opt/python/cp39-cp39' ),
37- PythonConfiguration (version = '2.7' , identifier = 'cp27-manylinux_i686' , path_str = '/opt/python/cp27-cp27m' ),
38- PythonConfiguration (version = '2.7' , identifier = 'cp27-manylinux_i686' , path_str = '/opt/python/cp27-cp27mu' ),
39- PythonConfiguration (version = '3.5' , identifier = 'cp35-manylinux_i686' , path_str = '/opt/python/cp35-cp35m' ),
40- PythonConfiguration (version = '3.6' , identifier = 'cp36-manylinux_i686' , path_str = '/opt/python/cp36-cp36m' ),
41- PythonConfiguration (version = '3.7' , identifier = 'cp37-manylinux_i686' , path_str = '/opt/python/cp37-cp37m' ),
42- PythonConfiguration (version = '3.8' , identifier = 'cp38-manylinux_i686' , path_str = '/opt/python/cp38-cp38' ),
43- PythonConfiguration (version = '3.9' , identifier = 'cp39-manylinux_i686' , path_str = '/opt/python/cp39-cp39' ),
44- PythonConfiguration (version = '2.7' , identifier = 'pp27-manylinux_x86_64' , path_str = '/opt/python/pp27-pypy_73' ),
45- PythonConfiguration (version = '3.6' , identifier = 'pp36-manylinux_x86_64' , path_str = '/opt/python/pp36-pypy36_pp73' ),
46- PythonConfiguration (version = '3.7' , identifier = 'pp37-manylinux_x86_64' , path_str = '/opt/python/pp37-pypy37_pp73' ),
47- PythonConfiguration (version = '3.5' , identifier = 'cp35-manylinux_aarch64' , path_str = '/opt/python/cp35-cp35m' ),
48- PythonConfiguration (version = '3.6' , identifier = 'cp36-manylinux_aarch64' , path_str = '/opt/python/cp36-cp36m' ),
49- PythonConfiguration (version = '3.7' , identifier = 'cp37-manylinux_aarch64' , path_str = '/opt/python/cp37-cp37m' ),
50- PythonConfiguration (version = '3.8' , identifier = 'cp38-manylinux_aarch64' , path_str = '/opt/python/cp38-cp38' ),
51- PythonConfiguration (version = '3.9' , identifier = 'cp39-manylinux_aarch64' , path_str = '/opt/python/cp39-cp39' ),
52- PythonConfiguration (version = '3.5' , identifier = 'cp35-manylinux_ppc64le' , path_str = '/opt/python/cp35-cp35m' ),
53- PythonConfiguration (version = '3.6' , identifier = 'cp36-manylinux_ppc64le' , path_str = '/opt/python/cp36-cp36m' ),
54- PythonConfiguration (version = '3.7' , identifier = 'cp37-manylinux_ppc64le' , path_str = '/opt/python/cp37-cp37m' ),
55- PythonConfiguration (version = '3.8' , identifier = 'cp38-manylinux_ppc64le' , path_str = '/opt/python/cp38-cp38' ),
56- PythonConfiguration (version = '3.9' , identifier = 'cp39-manylinux_ppc64le' , path_str = '/opt/python/cp39-cp39' ),
57- PythonConfiguration (version = '3.5' , identifier = 'cp35-manylinux_s390x' , path_str = '/opt/python/cp35-cp35m' ),
58- PythonConfiguration (version = '3.6' , identifier = 'cp36-manylinux_s390x' , path_str = '/opt/python/cp36-cp36m' ),
59- PythonConfiguration (version = '3.7' , identifier = 'cp37-manylinux_s390x' , path_str = '/opt/python/cp37-cp37m' ),
60- PythonConfiguration (version = '3.8' , identifier = 'cp38-manylinux_s390x' , path_str = '/opt/python/cp38-cp38' ),
61- PythonConfiguration (version = '3.9' , identifier = 'cp39-manylinux_s390x' , path_str = '/opt/python/cp39-cp39' ),
62- ]
31+
32+ python_configurations = [PythonConfiguration (** item ) for item in python_configs ]
33+
6334
6435 # return all configurations whose arch is in our `architectures` list,
6536 # and match the build/skip rules
@@ -81,7 +52,7 @@ def build(options: BuildOptions) -> None:
8152 exit (2 )
8253
8354 assert options .manylinux_images is not None
84- python_configurations = get_python_configurations (options .build_selector , options .architectures )
55+ python_configurations = get_python_configurations (options .python_configs , options . build_selector , options .architectures )
8556 platforms = [
8657 ('cp' , 'manylinux_x86_64' , options .manylinux_images ['x86_64' ]),
8758 ('cp' , 'manylinux_i686' , options .manylinux_images ['i686' ]),
0 commit comments