Skip to content

Commit 59b157f

Browse files
authored
Merge pull request #926 from mattip/manylinux2014
always default to manylinux2014
2 parents 6ef2ec3 + 4122d77 commit 59b157f

File tree

9 files changed

+48
-44
lines changed

9 files changed

+48
-44
lines changed

cibuildwheel/options.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,8 @@ def build_options(self, identifier: Optional[str]) -> BuildOptions:
478478
)
479479

480480
if not config_value:
481-
# default to manylinux2010 if it's available, otherwise manylinux2014
482-
image = pinned_images.get("manylinux2010") or pinned_images.get(
483-
"manylinux2014"
484-
)
481+
# default to manylinux2014
482+
image = pinned_images.get("manylinux2014")
485483
elif config_value in pinned_images:
486484
image = pinned_images[config_value]
487485
else:

cibuildwheel/resources/defaults.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ before-test = ""
1919
test-requires = []
2020
test-extras = []
2121

22-
manylinux-x86_64-image = "manylinux2010"
23-
manylinux-i686-image = "manylinux2010"
22+
manylinux-x86_64-image = "manylinux2014"
23+
manylinux-i686-image = "manylinux2014"
2424
manylinux-aarch64-image = "manylinux2014"
2525
manylinux-ppc64le-image = "manylinux2014"
2626
manylinux-s390x-image = "manylinux2014"
27-
manylinux-pypy_x86_64-image = "manylinux2010"
28-
manylinux-pypy_i686-image = "manylinux2010"
27+
manylinux-pypy_x86_64-image = "manylinux2014"
28+
manylinux-pypy_i686-image = "manylinux2014"
2929
manylinux-pypy_aarch64-image = "manylinux2014"
3030

3131
musllinux-x86_64-image = "musllinux_1_1"

docs/cpp_standards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Building Python wheels with modern C++ standards (C++11 and later) requires a fe
66

77

88
## manylinux1 and C++14
9-
The default `manylinux1` image (based on CentOS 5) contains a version of GCC and libstdc++ that only supports C++11 and earlier standards. There are however ways to compile wheels with the C++14 standard (and later): https://github.com/pypa/manylinux/issues/118
9+
The old `manylinux1` image (based on CentOS 5) contains a version of GCC and libstdc++ that only supports C++11 and earlier standards. There are however ways to compile wheels with the C++14 standard (and later): https://github.com/pypa/manylinux/issues/118
1010

1111
`manylinux2010` and `manylinux2014` are newer and support all C++ standards (up to C++17).
1212

docs/options.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,20 @@ which means it can be given multiple times.
142142
```toml
143143
[tool.cibuildwheel]
144144
# Normal options, etc.
145-
manylinux-x86_64-image = "manylinux2010"
145+
manylinux-x86_64-image = "manylinux2014"
146146

147147
[[tool.cibuildwheel.overrides]]
148148
select = "cp36-*"
149149
manylinux-x86_64-image = "manylinux1"
150150

151151
[[tool.cibuildwheel.overrides]]
152-
select = "cp310-*"
153-
manylinux-x86_64-image = "manylinux2014"
152+
select = "cp3{7,8,9}-*"
153+
manylinux-x86_64-image = "manylinux2010"
154154
```
155155

156156
This example will build CPython 3.6 wheels on manylinux1, CPython 3.7-3.9
157-
images on manylinux2010, and CPython 3.10 wheels on manylinux2014.
157+
wheels on manylinux2010, and manylinux2014 wheels for any newer Python
158+
(like 3.10).
158159

159160

160161
## Options summary
@@ -878,14 +879,14 @@ Platform-specific environment variables are also available:<br/>
878879
879880
The available options are (default value):
880881

881-
- `CIBW_MANYLINUX_X86_64_IMAGE` ([`quay.io/pypa/manylinux2010_x86_64`](https://quay.io/pypa/manylinux2010_x86_64))
882-
- `CIBW_MANYLINUX_I686_IMAGE` ([`quay.io/pypa/manylinux2010_i686`](https://quay.io/pypa/manylinux2010_i686))
883-
- `CIBW_MANYLINUX_PYPY_X86_64_IMAGE` ([`quay.io/pypa/manylinux2010_x86_64`](https://quay.io/pypa/manylinux2010_x86_64))
882+
- `CIBW_MANYLINUX_X86_64_IMAGE` ([`quay.io/pypa/manylinux2014_x86_64`](https://quay.io/pypa/manylinux2014_x86_64))
883+
- `CIBW_MANYLINUX_I686_IMAGE` ([`quay.io/pypa/manylinux2014_i686`](https://quay.io/pypa/manylinux2014_i686))
884+
- `CIBW_MANYLINUX_PYPY_X86_64_IMAGE` ([`quay.io/pypa/manylinux2014_x86_64`](https://quay.io/pypa/manylinux2014_x86_64))
884885
- `CIBW_MANYLINUX_AARCH64_IMAGE` ([`quay.io/pypa/manylinux2014_aarch64`](https://quay.io/pypa/manylinux2014_aarch64))
885886
- `CIBW_MANYLINUX_PPC64LE_IMAGE` ([`quay.io/pypa/manylinux2014_ppc64le`](https://quay.io/pypa/manylinux2014_ppc64le))
886-
- `CIBW_MANYLINUX_S390X_IMAGE` ([`quay.io/pypa/manylinux2014_s390x`](https://quay.io/pypa/manylinux2010_s390x))
887+
- `CIBW_MANYLINUX_S390X_IMAGE` ([`quay.io/pypa/manylinux2014_s390x`](https://quay.io/pypa/manylinux2014_s390x))
887888
- `CIBW_MANYLINUX_PYPY_AARCH64_IMAGE` ([`quay.io/pypa/manylinux2014_aarch64`](https://quay.io/pypa/manylinux2014_aarch64))
888-
- `CIBW_MANYLINUX_PYPY_I686_IMAGE` ([`quay.io/pypa/manylinux2010_i686`](https://quay.io/pypa/manylinux2010_i686))
889+
- `CIBW_MANYLINUX_PYPY_I686_IMAGE` ([`quay.io/pypa/manylinux2014_i686`](https://quay.io/pypa/manylinux2014_i686))
889890
- `CIBW_MUSLLINUX_X86_64_IMAGE` ([`quay.io/pypa/musllinux_1_1_x86_64`](https://quay.io/pypa/musllinux_1_1_x86_64))
890891
- `CIBW_MUSLLINUX_I686_IMAGE` ([`quay.io/pypa/musllinux_1_1_i686`](https://quay.io/pypa/musllinux_1_1_i686))
891892
- `CIBW_MUSLLINUX_AARCH64_IMAGE` ([`quay.io/pypa/musllinux_1_1_aarch64`](https://quay.io/pypa/musllinux_1_1_aarch64))
@@ -922,12 +923,12 @@ Auditwheel detects the version of the manylinux / musllinux standard in the Dock
922923
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux2014
923924
CIBW_MANYLINUX_PYPY_I686_IMAGE: manylinux2014
924925

925-
# Build using the latest manylinux2010 release, instead of the cibuildwheel
926+
# Build using the latest manylinux2014 release, instead of the cibuildwheel
926927
# pinned version
927-
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2010_x86_64:latest
928-
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2010_i686:latest
929-
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: quay.io/pypa/manylinux2010_x86_64:latest
930-
CIBW_MANYLINUX_PYPY_I686_IMAGE: quay.io/pypa/manylinux2010_i686:latest
928+
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
929+
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest
930+
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
931+
CIBW_MANYLINUX_PYPY_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest
931932

932933
# Build using a different image from the docker registry
933934
CIBW_MANYLINUX_X86_64_IMAGE: dockcross/manylinux-x64

test/test_docker_images.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def test(tmp_path):
3535
actual_wheels = utils.cibuildwheel_run(
3636
project_dir,
3737
add_env={
38-
"CIBW_MANYLINUX_X86_64_IMAGE": "dockcross/manylinux2010-x64",
39-
"CIBW_MANYLINUX_I686_IMAGE": "dockcross/manylinux2010-x86",
38+
"CIBW_MANYLINUX_X86_64_IMAGE": "dockcross/manylinux2014-x64",
39+
"CIBW_MANYLINUX_I686_IMAGE": "dockcross/manylinux2014-x86",
4040
"CIBW_BUILD": "cp3{6,7,8,9}-manylinux*",
4141
},
4242
)

test/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,12 @@ def expected_wheels(
120120

121121
if manylinux_versions is None:
122122
if machine_arch == "x86_64":
123-
manylinux_versions = ["manylinux_2_5", "manylinux1", "manylinux_2_12", "manylinux2010"]
123+
manylinux_versions = [
124+
"manylinux_2_5",
125+
"manylinux1",
126+
"manylinux_2_17",
127+
"manylinux2014",
128+
]
124129
else:
125130
manylinux_versions = ["manylinux_2_17", "manylinux2014"]
126131

unit_test/main_tests/main_options_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ def test_empty_selector(platform, intercepted_build_args, monkeypatch):
7171
@pytest.mark.parametrize(
7272
"architecture, image, full_image",
7373
[
74-
("x86_64", None, "quay.io/pypa/manylinux2010_x86_64:*"),
74+
("x86_64", None, "quay.io/pypa/manylinux2014_x86_64:*"),
7575
("x86_64", "manylinux1", "quay.io/pypa/manylinux1_x86_64:*"),
7676
("x86_64", "manylinux2010", "quay.io/pypa/manylinux2010_x86_64:*"),
7777
("x86_64", "manylinux2014", "quay.io/pypa/manylinux2014_x86_64:*"),
7878
("x86_64", "manylinux_2_24", "quay.io/pypa/manylinux_2_24_x86_64:*"),
7979
("x86_64", "custom_image", "custom_image"),
80-
("i686", None, "quay.io/pypa/manylinux2010_i686:*"),
80+
("i686", None, "quay.io/pypa/manylinux2014_i686:*"),
8181
("i686", "manylinux1", "quay.io/pypa/manylinux1_i686:*"),
8282
("i686", "manylinux2010", "quay.io/pypa/manylinux2010_i686:*"),
8383
("i686", "manylinux2014", "quay.io/pypa/manylinux2014_i686:*"),
8484
("i686", "manylinux_2_24", "quay.io/pypa/manylinux_2_24_i686:*"),
8585
("i686", "custom_image", "custom_image"),
86-
("pypy_x86_64", None, "quay.io/pypa/manylinux2010_x86_64:*"),
86+
("pypy_x86_64", None, "quay.io/pypa/manylinux2014_x86_64:*"),
8787
("pypy_x86_64", "manylinux1", "manylinux1"), # Does not exist
8888
("pypy_x86_64", "manylinux2010", "quay.io/pypa/manylinux2010_x86_64:*"),
8989
("pypy_x86_64", "manylinux2014", "quay.io/pypa/manylinux2014_x86_64:*"),

unit_test/option_prepare_test.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ def test_build_default_launches(mock_build_docker, fake_package_dir, monkeypatch
5252

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

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

6262
kwargs = build_on_docker.call_args_list[1][1]
63-
assert "quay.io/pypa/manylinux2010_i686" in kwargs["docker"]["docker_image"]
63+
assert "quay.io/pypa/manylinux2014_i686" in kwargs["docker"]["docker_image"]
6464
assert kwargs["docker"]["cwd"] == Path("/project")
6565
assert kwargs["docker"]["simulate_32_bit"]
6666

@@ -94,13 +94,13 @@ def test_build_with_override_launches(mock_build_docker, monkeypatch, tmp_path):
9494
cibw_toml.write_text(
9595
"""
9696
[tool.cibuildwheel]
97-
manylinux-x86_64-image = "manylinux2014"
97+
manylinux-x86_64-image = "manylinux_2_24"
9898
99-
# Before Python 3.10, manylinux2010 is the most compatible
99+
# Before Python 3.10, use manylinux2014
100100
[[tool.cibuildwheel.overrides]]
101101
select = "cp3?-*"
102-
manylinux-x86_64-image = "manylinux2010"
103-
manylinux-i686-image = "manylinux2010"
102+
manylinux-x86_64-image = "manylinux2014"
103+
manylinux-i686-image = "manylinux2014"
104104
105105
[[tool.cibuildwheel.overrides]]
106106
select = "cp36-manylinux_x86_64"
@@ -118,7 +118,7 @@ def test_build_with_override_launches(mock_build_docker, monkeypatch, tmp_path):
118118
assert build_on_docker.call_count == 6
119119

120120
kwargs = build_on_docker.call_args_list[0][1]
121-
assert "quay.io/pypa/manylinux2010_x86_64" in kwargs["docker"]["docker_image"]
121+
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["docker"]["docker_image"]
122122
assert kwargs["docker"]["cwd"] == Path("/project")
123123
assert not kwargs["docker"]["simulate_32_bit"]
124124

@@ -127,7 +127,7 @@ def test_build_with_override_launches(mock_build_docker, monkeypatch, tmp_path):
127127
assert kwargs["options"].build_options("cp36-manylinux_x86_64").before_all == "true"
128128

129129
kwargs = build_on_docker.call_args_list[1][1]
130-
assert "quay.io/pypa/manylinux2010_x86_64" in kwargs["docker"]["docker_image"]
130+
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["docker"]["docker_image"]
131131
assert kwargs["docker"]["cwd"] == Path("/project")
132132
assert not kwargs["docker"]["simulate_32_bit"]
133133

@@ -138,7 +138,7 @@ def test_build_with_override_launches(mock_build_docker, monkeypatch, tmp_path):
138138
assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == ""
139139

140140
kwargs = build_on_docker.call_args_list[2][1]
141-
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["docker"]["docker_image"]
141+
assert "quay.io/pypa/manylinux_2_24_x86_64" in kwargs["docker"]["docker_image"]
142142
assert kwargs["docker"]["cwd"] == Path("/project")
143143
assert not kwargs["docker"]["simulate_32_bit"]
144144
identifiers = {x.identifier for x in kwargs["platform_configs"]}
@@ -149,7 +149,7 @@ def test_build_with_override_launches(mock_build_docker, monkeypatch, tmp_path):
149149
}
150150

151151
kwargs = build_on_docker.call_args_list[3][1]
152-
assert "quay.io/pypa/manylinux2010_i686" in kwargs["docker"]["docker_image"]
152+
assert "quay.io/pypa/manylinux2014_i686" in kwargs["docker"]["docker_image"]
153153
assert kwargs["docker"]["cwd"] == Path("/project")
154154
assert kwargs["docker"]["simulate_32_bit"]
155155

unit_test/options_toml_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_simple_settings(tmp_path, platform, fname):
6060
)
6161

6262
assert options_reader.get("manylinux-x86_64-image") == "manylinux1"
63-
assert options_reader.get("manylinux-i686-image") == "manylinux2010"
63+
assert options_reader.get("manylinux-i686-image") == "manylinux2014"
6464

6565
with pytest.raises(ConfigOptionError):
6666
options_reader.get("environment", sep=" ")
@@ -71,7 +71,7 @@ def test_simple_settings(tmp_path, platform, fname):
7171

7272
def test_envvar_override(tmp_path, platform, monkeypatch):
7373
monkeypatch.setenv("CIBW_BUILD", "cp38*")
74-
monkeypatch.setenv("CIBW_MANYLINUX_X86_64_IMAGE", "manylinux2014")
74+
monkeypatch.setenv("CIBW_MANYLINUX_X86_64_IMAGE", "manylinux_2_24")
7575
monkeypatch.setenv("CIBW_TEST_COMMAND", "mytest")
7676
monkeypatch.setenv("CIBW_TEST_REQUIRES", "docs")
7777
monkeypatch.setenv("CIBW_TEST_REQUIRES_LINUX", "scod")
@@ -84,8 +84,8 @@ def test_envvar_override(tmp_path, platform, monkeypatch):
8484
assert options_reader.get("archs", sep=" ") == "auto"
8585

8686
assert options_reader.get("build", sep=" ") == "cp38*"
87-
assert options_reader.get("manylinux-x86_64-image") == "manylinux2014"
88-
assert options_reader.get("manylinux-i686-image") == "manylinux2010"
87+
assert options_reader.get("manylinux-x86_64-image") == "manylinux_2_24"
88+
assert options_reader.get("manylinux-i686-image") == "manylinux2014"
8989

9090
assert (
9191
options_reader.get("test-requires", sep=" ")
@@ -222,7 +222,7 @@ def test_environment_override_empty(tmp_path, monkeypatch):
222222
assert options_reader.get("manylinux-i686-image") == ""
223223
assert options_reader.get("manylinux-aarch64-image") == "manylinux1"
224224

225-
assert options_reader.get("manylinux-x86_64-image", ignore_empty=True) == "manylinux2010"
225+
assert options_reader.get("manylinux-x86_64-image", ignore_empty=True) == "manylinux2014"
226226
assert options_reader.get("manylinux-i686-image", ignore_empty=True) == "manylinux1"
227227
assert options_reader.get("manylinux-aarch64-image", ignore_empty=True) == "manylinux1"
228228

0 commit comments

Comments
 (0)