test: update expected wheels when using auditwheel >= 4

This commit is contained in:
mayeut
2021-05-08 22:13:29 -04:00
committed by Henry Schreiner
parent a7edf88fc3
commit a972ee9fc7
4 changed files with 24 additions and 20 deletions
+1 -12
View File
@@ -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)
+7 -1
View File
@@ -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)
+8 -3
View File
@@ -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)
+8 -4
View File
@@ -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":