diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 8112629b..fb79c9fb 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -146,7 +146,7 @@ def main(): # TODO Add documentation on CIBW_ENVIRONMENT and possibility of AUDITWHEEL_PLAT if not defined by custom manylinux image manylinux_x86_64_image = os.environ.get('CIBW_MANYLINUX_X86_64_IMAGE', 'manylinux2010') - manylinux_i686_image = os.environ.get('CIBW_MANYLINUX_I686_IMAGE', '') + manylinux_i686_image = os.environ.get('CIBW_MANYLINUX_I686_IMAGE', 'manylinux1') default_manylinux_images_x86_64 = {'manylinux1': 'quay.io/pypa/manylinux1_x86_64', 'manylinux2010': 'quay.io/pypa/manylinux2010_x86_64'} diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 84b16e48..233f1f02 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -47,8 +47,6 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef ] for platform_tag, docker_image in platforms: - if not docker_image: - continue platform_configs = [c for c in python_configurations if c.identifier.endswith(platform_tag)] if not platform_configs: continue diff --git a/test/01_basic/cibuildwheel_test.py b/test/01_basic/cibuildwheel_test.py index 93c67829..32da2c6f 100644 --- a/test/01_basic/cibuildwheel_test.py +++ b/test/01_basic/cibuildwheel_test.py @@ -17,6 +17,9 @@ def test(): def test_build_identifiers(): # check that the number of expected wheels matches the number of build # identifiers - expected_wheels = utils.expected_wheels('spam', '0.1.0') + # after adding CIBW_MANYLINUX_IMAGE to support manylinux2010, there + # can be multiple wheels for each wheel, though, so we need to limit + # the expected wheels + expected_wheels = utils.expected_wheels('spam', '0.1.0', manylinux_x86_64_versions={'manylinux2010'}, manylinux_i686_versions={'manylinux1'}) build_identifiers = utils.cibuildwheel_get_build_identifiers(project_dir) assert len(expected_wheels) == len(build_identifiers) diff --git a/test/06_docker_images/cibuildwheel_test.py b/test/06_docker_images/cibuildwheel_test.py index c586151b..f1ef516c 100644 --- a/test/06_docker_images/cibuildwheel_test.py +++ b/test/06_docker_images/cibuildwheel_test.py @@ -15,6 +15,6 @@ def test(): }) # also check that we got the right wheels built - expected_wheels = utils.expected_wheels('spam', '0.1.0', manylinux_versions={'manylinux1_x86_64', 'manylinux2010_x86_64', 'manylinux1_i686'}) + expected_wheels = utils.expected_wheels('spam', '0.1.0') actual_wheels = os.listdir('wheelhouse') assert set(actual_wheels) == set(expected_wheels) diff --git a/test/08_manylinux2010_only/cibuildwheel_test.py b/test/08_manylinux2010_only/cibuildwheel_test.py index 814a364b..203e1fbe 100644 --- a/test/08_manylinux2010_only/cibuildwheel_test.py +++ b/test/08_manylinux2010_only/cibuildwheel_test.py @@ -12,9 +12,11 @@ def test(): # rather than when dynamically loading the Python utils.cibuildwheel_run(project_dir, add_env={ 'CIBW_ENVIRONMENT': 'CFLAGS="$CFLAGS -Werror=implicit-function-declaration"', + 'CIBW_SKIP': '*-manylinux_i686', }) # also check that we got the right wheels - expected_wheels = utils.expected_wheels('spam', '0.1.0', manylinux_versions={'manylinux2010_x86_64'}) + expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0', manylinux_x86_64_versions={'manylinux2010'}) + if '-manylinux1_i686' not in w] actual_wheels = os.listdir('wheelhouse') assert set(actual_wheels) == set(expected_wheels) diff --git a/test/shared/utils.py b/test/shared/utils.py index d4ea60a5..3edba2ee 100644 --- a/test/shared/utils.py +++ b/test/shared/utils.py @@ -42,13 +42,13 @@ def cibuildwheel_run(project_path, env=None, add_env=None): ) -def expected_wheels(package_name, package_version, manylinux_versions={'manylinux1_x86_64', 'manylinux2010_x86_64'}): +def expected_wheels(package_name, package_version, manylinux_x86_64_versions={'manylinux1', 'manylinux2010'}, manylinux_i686_versions={'manylinux1'}): ''' Returns a list of expected wheels from a run of cibuildwheel. ''' if platform == 'linux': templates = [] - if 'manylinux1_x86_64' in manylinux_versions: + if 'manylinux1' in manylinux_x86_64_versions: templates += [ '{package_name}-{package_version}-cp27-cp27m-manylinux1_x86_64.whl', '{package_name}-{package_version}-cp27-cp27mu-manylinux1_x86_64.whl', @@ -57,16 +57,7 @@ def expected_wheels(package_name, package_version, manylinux_versions={'manylinu '{package_name}-{package_version}-cp36-cp36m-manylinux1_x86_64.whl', '{package_name}-{package_version}-cp37-cp37m-manylinux1_x86_64.whl', ] - if 'manylinux1_i686' in manylinux_versions: - templates += [ - '{package_name}-{package_version}-cp27-cp27m-manylinux1_i686.whl', - '{package_name}-{package_version}-cp27-cp27mu-manylinux1_i686.whl', - '{package_name}-{package_version}-cp34-cp34m-manylinux1_i686.whl', - '{package_name}-{package_version}-cp35-cp35m-manylinux1_i686.whl', - '{package_name}-{package_version}-cp36-cp36m-manylinux1_i686.whl', - '{package_name}-{package_version}-cp37-cp37m-manylinux1_i686.whl', - ] - if 'manylinux2010_x86_64' in manylinux_versions: + if 'manylinux2010' in manylinux_x86_64_versions: templates += [ '{package_name}-{package_version}-cp27-cp27m-manylinux2010_x86_64.whl', '{package_name}-{package_version}-cp27-cp27mu-manylinux2010_x86_64.whl', @@ -75,6 +66,15 @@ def expected_wheels(package_name, package_version, manylinux_versions={'manylinu '{package_name}-{package_version}-cp36-cp36m-manylinux2010_x86_64.whl', '{package_name}-{package_version}-cp37-cp37m-manylinux2010_x86_64.whl', ] + if 'manylinux1' in manylinux_i686_versions: + templates += [ + '{package_name}-{package_version}-cp27-cp27m-manylinux1_i686.whl', + '{package_name}-{package_version}-cp27-cp27mu-manylinux1_i686.whl', + '{package_name}-{package_version}-cp34-cp34m-manylinux1_i686.whl', + '{package_name}-{package_version}-cp35-cp35m-manylinux1_i686.whl', + '{package_name}-{package_version}-cp36-cp36m-manylinux1_i686.whl', + '{package_name}-{package_version}-cp37-cp37m-manylinux1_i686.whl', + ] elif platform == 'windows': templates = [ '{package_name}-{package_version}-cp27-cp27m-win32.whl',