First try at implementing optionsfor allowing different manylinux1 docker images

This commit is contained in:
Yannick Jadoul
2017-10-29 11:47:38 +01:00
parent 6bbef964c9
commit 4e0b3c0f31
5 changed files with 71 additions and 4 deletions
+3 -1
View File
@@ -76,6 +76,8 @@ def main():
before_build = get_option_from_environment('CIBW_BEFORE_BUILD', platform=platform)
skip_config = os.environ.get('CIBW_SKIP', '')
environment_config = get_option_from_environment('CIBW_ENVIRONMENT', platform=platform) or ''
manylinux1_x86_64_image = os.environ.get('CIBW_MANYLINUX1_X86_64_IMAGE', None)
manylinux1_i686_image = os.environ.get('CIBW_MANYLINUX1_I686_IMAGE', None)
try:
environment = parse_environment(environment_config)
@@ -128,7 +130,7 @@ def main():
os.makedirs(output_dir)
if platform == 'linux':
cibuildwheel.linux.build(**build_options)
cibuildwheel.linux.build(manylinux1_x86_64_image=manylinux1_x86_64_image, manylinux1_i686_image=manylinux1_i686_image, **build_options)
elif platform == 'windows':
cibuildwheel.windows.build(**build_options)
elif platform == 'macos':
+3 -3
View File
@@ -9,7 +9,7 @@ except ImportError:
from pipes import quote as shlex_quote
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, skip, environment):
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, skip, environment, manylinux1_x86_64_image, manylinux1_i686_image):
try:
subprocess.check_call(['docker', '--version'])
except:
@@ -38,8 +38,8 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
python_configurations = [c for c in python_configurations if not skip(c.identifier)]
platforms = [
('manylinux1_x86_64', 'quay.io/pypa/manylinux1_x86_64'),
('manylinux1_i686', 'quay.io/pypa/manylinux1_i686'),
('manylinux1_x86_64', manylinux1_x86_64_image or 'quay.io/pypa/manylinux1_x86_64'),
('manylinux1_i686', manylinux1_i686_image or 'quay.io/pypa/manylinux1_i686'),
]
for platform_tag, docker_image in platforms: