diff --git a/test/test_0_basic.py b/test/test_0_basic.py index b514b6bd..1e856865 100644 --- a/test/test_0_basic.py +++ b/test/test_0_basic.py @@ -1,4 +1,3 @@ -import platform import textwrap import pytest @@ -53,16 +52,6 @@ def test_build_identifiers(tmp_path): # check that the number of expected wheels matches the number of build # identifiers - # 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 - if platform.machine() in ["x86_64", "i686"]: - expected_wheels = [ - w - for w in utils.expected_wheels("spam", "0.1.0") - if "-manylinux" not in w or "-manylinux1" in w - ] - else: - expected_wheels = utils.expected_wheels("spam", "0.1.0") + expected_wheels = utils.expected_wheels("spam", "0.1.0") build_identifiers = utils.cibuildwheel_get_build_identifiers(project_dir) assert len(expected_wheels) == len(build_identifiers) diff --git a/test/test_docker_images.py b/test/test_docker_images.py index 70b53254..4cb2e538 100644 --- a/test/test_docker_images.py +++ b/test/test_docker_images.py @@ -42,7 +42,13 @@ def test(tmp_path): ) # also check that we got the right wheels built + # there's no auditwheel 4+ on dockcross image + # remove manylinux1 wheels from the list of actual_wheels + # and restrict expected_wheels to manylinux2010 wheels + actual_wheels = [w for w in actual_wheels if "-manylinux1" not in w] expected_wheels = [ - w for w in utils.expected_wheels("spam", "0.1.0") if "-pp" not in w and "-cp39-" not in w + w + for w in utils.expected_wheels("spam", "0.1.0", manylinux_versions=["manylinux2010"]) + if "-pp" not in w and "-cp39-" not in w ] assert set(actual_wheels) == set(expected_wheels) diff --git a/test/test_manylinuxXXXX_only.py b/test/test_manylinuxXXXX_only.py index 0d38f990..a406fed4 100644 --- a/test/test_manylinuxXXXX_only.py +++ b/test/test_manylinuxXXXX_only.py @@ -72,9 +72,14 @@ def test(manylinux_image, tmp_path): actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env) - expected_wheels = [ - w for w in utils.expected_wheels("spam", "0.1.0", manylinux_versions=[manylinux_image]) - ] + platform_tag_map = { + "manylinux1": ["manylinux_2_5", "manylinux1"], + "manylinux2010": ["manylinux_2_12", "manylinux2010"], + "manylinux2014": ["manylinux_2_17", "manylinux2014"], + } + expected_wheels = utils.expected_wheels( + "spam", "0.1.0", manylinux_versions=platform_tag_map.get(manylinux_image, [manylinux_image]) + ) if manylinux_image in {"manylinux1", "manylinux2014", "manylinux_2_24"}: expected_wheels = [w for w in expected_wheels if "-pp" not in w] assert set(actual_wheels) == set(expected_wheels) diff --git a/test/utils.py b/test/utils.py index 5b6b5b7c..16bb390c 100644 --- a/test/utils.py +++ b/test/utils.py @@ -114,9 +114,9 @@ def expected_wheels( if manylinux_versions is None: if machine_arch == "x86_64": - manylinux_versions = ["manylinux1", "manylinux2010"] + manylinux_versions = ["manylinux_2_5", "manylinux1", "manylinux_2_12", "manylinux2010"] else: - manylinux_versions = ["manylinux2014"] + manylinux_versions = ["manylinux_2_17", "manylinux2014"] python_abi_tags = ["cp36-cp36m", "cp37-cp37m", "cp38-cp38", "cp39-cp39"] @@ -144,9 +144,13 @@ def expected_wheels( architectures.append("i686") platform_tags = [ - f"{manylinux_version}_{architecture}" + ".".join( + [ + f"{manylinux_version}_{architecture}" + for manylinux_version in manylinux_versions + ] + ) for architecture in architectures - for manylinux_version in manylinux_versions ] elif platform == "windows":