Skip to content

Commit e2e2488

Browse files
authored
feat: add default riscv64 images (#2506)
1 parent a8bff94 commit e2e2488

File tree

6 files changed

+18
-20
lines changed

6 files changed

+18
-20
lines changed

bin/update_docker.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,12 @@ def __init__(self, manylinux_version: str, platforms: list[str], tag: str | None
7171
"pypy_aarch64",
7272
],
7373
),
74+
# manylinux_2_39 images
75+
PyPAImage("manylinux_2_39", ["riscv64"]),
7476
# musllinux_1_2 images
75-
PyPAImage("musllinux_1_2", ["x86_64", "i686", "aarch64", "ppc64le", "s390x", "armv7l"]),
77+
PyPAImage(
78+
"musllinux_1_2", ["x86_64", "i686", "aarch64", "ppc64le", "s390x", "armv7l", "riscv64"]
79+
),
7680
]
7781

7882
config = configparser.ConfigParser()
@@ -136,8 +140,5 @@ def __init__(self, manylinux_version: str, platforms: list[str], tag: str | None
136140
suffix = f"_{platform.removeprefix('pypy_')}"
137141
config[platform][image.manylinux_version] = f"{image.image_name}{suffix}:{tag_name}"
138142

139-
if not config.has_section("riscv64"):
140-
config["riscv64"] = {}
141-
142143
with open(RESOURCES / "pinned_docker_images.cfg", "w") as f:
143144
config.write(f)

cibuildwheel/resources/defaults.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ manylinux-aarch64-image = "manylinux_2_28"
3636
manylinux-ppc64le-image = "manylinux_2_28"
3737
manylinux-s390x-image = "manylinux_2_28"
3838
manylinux-armv7l-image = "manylinux_2_31"
39-
manylinux-riscv64-image = "ghcr.io/pypa/cibuildwheel/no_default_image:please_use_override"
39+
manylinux-riscv64-image = "manylinux_2_39"
4040
manylinux-pypy_x86_64-image = "manylinux_2_28"
4141
manylinux-pypy_i686-image = "manylinux_2_28"
4242
manylinux-pypy_aarch64-image = "manylinux_2_28"
@@ -47,7 +47,7 @@ musllinux-aarch64-image = "musllinux_1_2"
4747
musllinux-ppc64le-image = "musllinux_1_2"
4848
musllinux-s390x-image = "musllinux_1_2"
4949
musllinux-armv7l-image = "musllinux_1_2"
50-
musllinux-riscv64-image = "ghcr.io/pypa/cibuildwheel/no_default_image:please_use_override"
50+
musllinux-riscv64-image = "musllinux_1_2"
5151

5252

5353
[tool.cibuildwheel.linux]

cibuildwheel/resources/pinned_docker_images.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@ manylinux_2_31 = quay.io/pypa/manylinux_2_31_armv7l:2025.07.20-2
4848
musllinux_1_2 = quay.io/pypa/musllinux_1_2_armv7l:2025.07.20-2
4949

5050
[riscv64]
51+
manylinux_2_39 = quay.io/pypa/manylinux_2_39_riscv64:2025.07.20-2
52+
musllinux_1_2 = quay.io/pypa/musllinux_1_2_riscv64:2025.07.20-2
5153

docs/options.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ The available options are:
10161016
| `manylinux-ppc64le-image` | [`manylinux_2_28`](https://quay.io/pypa/manylinux_2_28_ppc64le) |
10171017
| `manylinux-s390x-image` | [`manylinux_2_28`](https://quay.io/pypa/manylinux_2_28_s390x) |
10181018
| `manylinux-armv7l-image` | [`manylinux_2_31`](https://quay.io/pypa/manylinux_2_31_armv7l) |
1019-
| `manylinux-riscv64-image` | No default |
1019+
| `manylinux-riscv64-image` | [`manylinux_2_39`](https://quay.io/pypa/manylinux_2_39_riscv64) |
10201020
| `manylinux-pypy_aarch64-image` | [`manylinux_2_28`](https://quay.io/pypa/manylinux_2_28_aarch64) |
10211021
| `manylinux-pypy_i686-image` | [`manylinux_2_28`](https://quay.io/pypa/manylinux_2_28_i686) |
10221022
| `musllinux_x86_64-image` | [`musllinux_1_2`](https://quay.io/pypa/musllinux_1_2_x86_64) |
@@ -1025,14 +1025,16 @@ The available options are:
10251025
| `musllinux-ppc64le-image` | [`musllinux_1_2`](https://quay.io/pypa/musllinux_1_2_ppc64le) |
10261026
| `musllinux-s390x-image` | [`musllinux_1_2`](https://quay.io/pypa/musllinux_1_2_s390x) |
10271027
| `musllinux-armv7l-image` | [`musllinux_1_2`](https://quay.io/pypa/musllinux_1_2_armv7l) |
1028-
| `musllinux-riscv64-image` | No default |
1028+
| `musllinux-riscv64-image` | [`musllinux_1_2`](https://quay.io/pypa/musllinux_1_2_riscv64) |
10291029

10301030
Set the Docker image to be used for building [manylinux / musllinux](https://github.com/pypa/manylinux) wheels.
10311031

1032-
For `manylinux-*-image`, except `manylinux-armv7l-image`, the value of this option can either be set to `manylinux2014`, `manylinux_2_28` or `manylinux_2_34` to use a pinned version of the [official manylinux images](https://github.com/pypa/manylinux). Alternatively, set these options to any other valid Docker image name.
1032+
For `manylinux-*-image`, except `manylinux-armv7l-image` and `manylinux-riscv64-image`, the value of this option can either be set to `manylinux2014`, `manylinux_2_28` or `manylinux_2_34` to use a pinned version of the [official manylinux images](https://github.com/pypa/manylinux). Alternatively, set these options to any other valid Docker image name.
10331033

10341034
For `manylinux-armv7l-image`, the value of this option can either be set to `manylinux_2_31` or a custom image. Support is experimental for now. The `manylinux_2_31` value is only available for `armv7`.
10351035

1036+
For `manylinux-riscv64-image`, the value of this option can either be set to `manylinux_2_39` or a custom image. Support is experimental for now. The `manylinux_2_39` value is only available for `riscv64`.
1037+
10361038
For `musllinux-*-image`, the value of this option can either be set to `musllinux_1_2` or a custom image.
10371039

10381040
If this option is blank, it will fall though to the next available definition (environment variable -> pyproject.toml -> default).

test/test_emulation.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,14 @@ def test(tmp_path, request):
3434
"CIBW_TEST_REQUIRES": "pytest",
3535
"CIBW_TEST_COMMAND": "pytest {project}/test",
3636
"CIBW_ARCHS": archs,
37-
# TODO remove me once proper support is added
38-
"CIBW_MANYLINUX_RISCV64_IMAGE": "ghcr.io/mayeut/manylinux_2_35:2025.05.11-1",
39-
"CIBW_SKIP": "*-musllinux_riscv64",
4037
},
4138
)
4239

4340
# also check that we got the right wheels
44-
expected_wheels = list(
45-
itertools.chain.from_iterable(
46-
utils.expected_wheels("spam", "0.1.0", machine_arch=arch, single_arch=True)
47-
for arch in archs.split(" ")
48-
)
41+
expected_wheels = itertools.chain.from_iterable(
42+
utils.expected_wheels("spam", "0.1.0", machine_arch=arch, single_arch=True)
43+
for arch in archs.split(" ")
4944
)
50-
# TODO remove me once proper support is added
51-
expected_wheels = [wheel for wheel in expected_wheels if "musllinux_1_2_riscv64" not in wheel]
5245
assert set(actual_wheels) == set(expected_wheels)
5346

5447

test/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def _expected_wheels(
254254
"armv7l": ["manylinux2014", "manylinux_2_17", "manylinux_2_31"],
255255
"i686": ["manylinux1", "manylinux_2_28", "manylinux_2_5"],
256256
"x86_64": ["manylinux1", "manylinux_2_28", "manylinux_2_5"],
257-
"riscv64": ["manylinux_2_31", "manylinux_2_35"],
257+
"riscv64": ["manylinux_2_31", "manylinux_2_39"],
258258
}.get(machine_arch, ["manylinux2014", "manylinux_2_17", "manylinux_2_28"])
259259

260260
if musllinux_versions is None:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy