Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move default manylinux build to manylinux_2_28 #1988

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cibuildwheel/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ def build_options(self, identifier: str | None) -> BuildOptions:
)

if not config_value:
# default to manylinux2014
image = pinned_images["manylinux2014"]
# default to manylinux_2_28
image = pinned_images["manylinux_2_28"]
elif config_value in pinned_images:
image = pinned_images[config_value]
else:
Expand Down
16 changes: 8 additions & 8 deletions cibuildwheel/resources/defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ test-extras = []

container-engine = "docker"

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

musllinux-x86_64-image = "musllinux_1_2"
musllinux-i686-image = "musllinux_1_2"
Expand Down
36 changes: 18 additions & 18 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -1161,14 +1161,14 @@ Platform-specific environment variables are also available:<br/>

The available options are (default value):

- `CIBW_MANYLINUX_X86_64_IMAGE` ([`quay.io/pypa/manylinux2014_x86_64`](https://quay.io/pypa/manylinux2014_x86_64))
- `CIBW_MANYLINUX_I686_IMAGE` ([`quay.io/pypa/manylinux2014_i686`](https://quay.io/pypa/manylinux2014_i686))
- `CIBW_MANYLINUX_PYPY_X86_64_IMAGE` ([`quay.io/pypa/manylinux2014_x86_64`](https://quay.io/pypa/manylinux2014_x86_64))
- `CIBW_MANYLINUX_AARCH64_IMAGE` ([`quay.io/pypa/manylinux2014_aarch64`](https://quay.io/pypa/manylinux2014_aarch64))
- `CIBW_MANYLINUX_PPC64LE_IMAGE` ([`quay.io/pypa/manylinux2014_ppc64le`](https://quay.io/pypa/manylinux2014_ppc64le))
- `CIBW_MANYLINUX_S390X_IMAGE` ([`quay.io/pypa/manylinux2014_s390x`](https://quay.io/pypa/manylinux2014_s390x))
- `CIBW_MANYLINUX_PYPY_AARCH64_IMAGE` ([`quay.io/pypa/manylinux2014_aarch64`](https://quay.io/pypa/manylinux2014_aarch64))
- `CIBW_MANYLINUX_PYPY_I686_IMAGE` ([`quay.io/pypa/manylinux2014_i686`](https://quay.io/pypa/manylinux2014_i686))
- `CIBW_MANYLINUX_X86_64_IMAGE` ([`quay.io/pypa/manylinux_2_28_x86_64`](https://quay.io/pypa/manylinux_2_28_x86_64))
- `CIBW_MANYLINUX_I686_IMAGE` ([`quay.io/pypa/manylinux_2_28_i686`](https://quay.io/pypa/manylinux_2_28_i686))
- `CIBW_MANYLINUX_PYPY_X86_64_IMAGE` ([`quay.io/pypa/manylinux_2_28_x86_64`](https://quay.io/pypa/manylinux_2_28_x86_64))
- `CIBW_MANYLINUX_AARCH64_IMAGE` ([`quay.io/pypa/manylinux_2_28_aarch64`](https://quay.io/pypa/manylinux_2_28_aarch64))
- `CIBW_MANYLINUX_PPC64LE_IMAGE` ([`quay.io/pypa/manylinux_2_28_ppc64le`](https://quay.io/pypa/manylinux_2_28_ppc64le))
- `CIBW_MANYLINUX_S390X_IMAGE` ([`quay.io/pypa/manylinux_2_28_s390x`](https://quay.io/pypa/manylinux_2_28_s390x))
- `CIBW_MANYLINUX_PYPY_AARCH64_IMAGE` ([`quay.io/pypa/manylinux_2_28_aarch64`](https://quay.io/pypa/manylinux_2_28_aarch64))
- `CIBW_MANYLINUX_PYPY_I686_IMAGE` ([`quay.io/pypa/manylinux_2_28_i686`](https://quay.io/pypa/manylinux_2_28_i686))
- `CIBW_MUSLLINUX_X86_64_IMAGE` ([`quay.io/pypa/musllinux_1_2_x86_64`](https://quay.io/pypa/musllinux_1_2_x86_64))
- `CIBW_MUSLLINUX_I686_IMAGE` ([`quay.io/pypa/musllinux_1_2_i686`](https://quay.io/pypa/musllinux_1_2_i686))
- `CIBW_MUSLLINUX_AARCH64_IMAGE` ([`quay.io/pypa/musllinux_1_2_aarch64`](https://quay.io/pypa/musllinux_1_2_aarch64))
Expand Down Expand Up @@ -1205,12 +1205,12 @@ Auditwheel detects the version of the manylinux / musllinux standard in the imag
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_PYPY_I686_IMAGE: manylinux2014

# Build using the latest manylinux2014 release, instead of the cibuildwheel
# Build using the latest manylinux_2_28 release, instead of the cibuildwheel
# pinned version
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
CIBW_MANYLINUX_PYPY_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64:latest
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux_2_28_i686:latest
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64:latest
CIBW_MANYLINUX_PYPY_I686_IMAGE: quay.io/pypa/manylinux_2_28_i686:latest

# Build using a different image from the docker registry
CIBW_MANYLINUX_X86_64_IMAGE: dockcross/manylinux-x64
Expand All @@ -1236,12 +1236,12 @@ Auditwheel detects the version of the manylinux / musllinux standard in the imag
manylinux-pypy_x86_64-image = "manylinux2014"
manylinux-pypy_i686-image = "manylinux2014"

# Build using the latest manylinux2010 release, instead of the cibuildwheel
# Build using the latest manylinux_2_28 release, instead of the cibuildwheel
# pinned version
manylinux-x86_64-image = "quay.io/pypa/manylinux2010_x86_64:latest"
manylinux-i686-image = "quay.io/pypa/manylinux2010_i686:latest"
manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux2010_x86_64:latest"
manylinux-pypy_i686-image = "quay.io/pypa/manylinux2010_i686:latest"
manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64:latest"
manylinux-i686-image = "quay.io/pypa/manylinux_2_28_i686:latest"
manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64:latest"
manylinux-pypy_i686-image = "quay.io/pypa/manylinux_2_28_i686:latest"

# Build using a different image from the docker registry
manylinux-x86_64-image = "dockcross/manylinux-x64"
Expand Down
3 changes: 2 additions & 1 deletion test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,10 @@ def expected_wheels(
"manylinux1",
"manylinux_2_17",
"manylinux2014",
"manylinux_2_28",
]
else:
manylinux_versions = ["manylinux_2_17", "manylinux2014"]
manylinux_versions = ["manylinux_2_17", "manylinux2014", "manylinux_2_28"]

if musllinux_versions is None:
musllinux_versions = ["musllinux_1_2"]
Expand Down
6 changes: 3 additions & 3 deletions unit_test/main_tests/main_options_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,20 @@ def test_empty_selector(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_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:*"),
("x86_64", "manylinux_2_24", "quay.io/pypa/manylinux_2_24_x86_64:*"),
("x86_64", "manylinux_2_28", "quay.io/pypa/manylinux_2_28_x86_64:*"),
("x86_64", "custom_image", "custom_image"),
("i686", None, "quay.io/pypa/manylinux2014_i686:*"),
("i686", None, "quay.io/pypa/manylinux_2_28_i686:*"),
("i686", "manylinux1", "quay.io/pypa/manylinux1_i686:*"),
("i686", "manylinux2010", "quay.io/pypa/manylinux2010_i686:*"),
("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_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
4 changes: 2 additions & 2 deletions unit_test/option_prepare_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ def test_build_default_launches(monkeypatch):

# In Python 3.8+, this can be simplified to [0].kwargs
kwargs = build_in_container.call_args_list[0][1]
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
assert "quay.io/pypa/manylinux_2_28_x86_64" in kwargs["container"]["image"]
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
assert not kwargs["container"]["enforce_32_bit"]

identifiers = {x.identifier for x in kwargs["platform_configs"]}
assert identifiers == {f"{x}-manylinux_x86_64" for x in ALL_IDS}

kwargs = build_in_container.call_args_list[1][1]
assert "quay.io/pypa/manylinux2014_i686" in kwargs["container"]["image"]
assert "quay.io/pypa/manylinux_2_28_i686" in kwargs["container"]["image"]
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
assert kwargs["container"]["enforce_32_bit"]

Expand Down
6 changes: 3 additions & 3 deletions unit_test/options_toml_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_simple_settings(tmp_path, platform, fname):
)

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

with pytest.raises(ConfigOptionError):
options_reader.get("environment", list_sep=" ")
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_envvar_override(tmp_path, platform):

assert options_reader.get("build", list_sep=" ") == "cp38*"
assert options_reader.get("manylinux-x86_64-image") == "manylinux_2_24"
assert options_reader.get("manylinux-i686-image") == "manylinux2014"
assert options_reader.get("manylinux-i686-image") == "manylinux_2_28"

assert (
options_reader.get("test-requires", list_sep=" ")
Expand Down Expand Up @@ -261,7 +261,7 @@ def test_environment_override_empty(tmp_path):
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
Loading