Skip to content

Commit

Permalink
Use manylinux_2_28 as default manylinux image (revert me)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Apr 3, 2022
1 parent 2737a5f commit 0416e5d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 14 deletions.
10 changes: 5 additions & 5 deletions cibuildwheel/resources/defaults.toml
Expand Up @@ -19,14 +19,14 @@ before-test = ""
test-requires = []
test-extras = []

manylinux-x86_64-image = "manylinux2014"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-i686-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"
manylinux-ppc64le-image = "manylinux2014"
manylinux-aarch64-image = "manylinux_2_28"
manylinux-ppc64le-image = "manylinux_2_28"
manylinux-s390x-image = "manylinux2014"
manylinux-pypy_x86_64-image = "manylinux2014"
manylinux-pypy_x86_64-image = "manylinux_2_28"
manylinux-pypy_i686-image = "manylinux2014"
manylinux-pypy_aarch64-image = "manylinux2014"
manylinux-pypy_aarch64-image = "manylinux_2_28"

musllinux-x86_64-image = "musllinux_1_1"
musllinux-i686-image = "musllinux_1_1"
Expand Down
2 changes: 1 addition & 1 deletion test/test_docker_images.py
Expand Up @@ -24,7 +24,7 @@
def test(tmp_path):
if utils.platform != "linux":
pytest.skip("the test is only relevant to the linux build")
if platform.machine() not in ["x86_64", "i686"]:
if platform.machine() not in ["i686"]:
pytest.skip(
"this test is currently only possible on x86_64/i686 due to availability of alternative images"
)
Expand Down
26 changes: 22 additions & 4 deletions test/utils.py
Expand Up @@ -121,13 +121,22 @@ def expected_wheels(
if manylinux_versions is None:
if machine_arch == "x86_64":
manylinux_versions = [
"manylinux_2_5",
"manylinux1",
"manylinux_2_28",
]
manylinux_versions_i686 = [
"manylinux_2_5",
"manylinux1",
"manylinux_2_17",
"manylinux2014",
]
else:
elif machine_arch == "s390x":
manylinux_versions = ["manylinux_2_17", "manylinux2014"]
else:
manylinux_versions = ["manylinux_2_17", "manylinux2014", "manylinux_2_28"]
else:
manylinux_versions_i686 = manylinux_versions

if musllinux_versions is None:
musllinux_versions = ["musllinux_1_1"]
Expand All @@ -149,16 +158,25 @@ def expected_wheels(
if platform == "linux":
architectures = [machine_arch]

if machine_arch == "x86_64":
architectures.append("i686")

platform_tags = [
".".join(
f"{manylinux_version}_{architecture}"
for manylinux_version in manylinux_versions
)
for architecture in architectures
]
if machine_arch == "x86_64":
architectures.append("i686")

platform_tags.extend(
[
".".join(
f"{manylinux_version}_i686"
for manylinux_version in manylinux_versions_i686
)
]
)

if len(musllinux_versions) > 0 and not python_abi_tag.startswith("pp"):
platform_tags.extend(
[
Expand Down
4 changes: 2 additions & 2 deletions unit_test/main_tests/main_options_test.py
Expand Up @@ -71,7 +71,7 @@ def test_empty_selector(platform, intercepted_build_args, monkeypatch):
@pytest.mark.parametrize(
"architecture, image, full_image",
[
("x86_64", None, "quay.io/pypa/manylinux2014_x86_64:*"),
("x86_64", None, "quay.io/pypa/manylinux_2_28_poc_x86_64:*"),
("x86_64", "manylinux1", "quay.io/pypa/manylinux1_x86_64:*"),
("x86_64", "manylinux2010", "quay.io/pypa/manylinux2010_x86_64:*"),
("x86_64", "manylinux2014", "quay.io/pypa/manylinux2014_x86_64:*"),
Expand All @@ -84,7 +84,7 @@ def test_empty_selector(platform, intercepted_build_args, monkeypatch):
("i686", "manylinux2014", "quay.io/pypa/manylinux2014_i686:*"),
("i686", "manylinux_2_24", "quay.io/pypa/manylinux_2_24_i686:*"),
("i686", "custom_image", "custom_image"),
("pypy_x86_64", None, "quay.io/pypa/manylinux2014_x86_64:*"),
("pypy_x86_64", None, "quay.io/pypa/manylinux_2_28_poc_x86_64:*"),
("pypy_x86_64", "manylinux1", "manylinux1"), # Does not exist
("pypy_x86_64", "manylinux2010", "quay.io/pypa/manylinux2010_x86_64:*"),
("pypy_x86_64", "manylinux2014", "quay.io/pypa/manylinux2014_x86_64:*"),
Expand Down
2 changes: 1 addition & 1 deletion unit_test/option_prepare_test.py
Expand Up @@ -52,7 +52,7 @@ def test_build_default_launches(mock_build_docker, fake_package_dir, monkeypatch

# In Python 3.8+, this can be simplified to [0].kwargs
kwargs = build_on_docker.call_args_list[0][1]
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["docker"]["docker_image"]
assert "quay.io/pypa/manylinux_2_28_poc_x86_64" in kwargs["docker"]["docker_image"]
assert kwargs["docker"]["cwd"] == Path("/project")
assert not kwargs["docker"]["simulate_32_bit"]

Expand Down
2 changes: 1 addition & 1 deletion unit_test/options_toml_test.py
Expand Up @@ -222,7 +222,7 @@ def test_environment_override_empty(tmp_path, monkeypatch):
assert options_reader.get("manylinux-i686-image") == ""
assert options_reader.get("manylinux-aarch64-image") == "manylinux1"

assert options_reader.get("manylinux-x86_64-image", ignore_empty=True) == "manylinux2014"
assert options_reader.get("manylinux-x86_64-image", ignore_empty=True) == "manylinux_2_28"
assert options_reader.get("manylinux-i686-image", ignore_empty=True) == "manylinux1"
assert options_reader.get("manylinux-aarch64-image", ignore_empty=True) == "manylinux1"

Expand Down

0 comments on commit 0416e5d

Please sign in to comment.