Skip to content

Commit 678e07c

Browse files
committed
ci: add riscv64 manylinux wheels
Now that both cibuildwheel and PyPI support riscv64, start building manylinux wheels for this architecture. contourpy depends on NumPy. While NumPy does not yet provide official riscv64 wheels [1], the RISE project does [2], which allows us to enable wheel builds and testing. Key points: - Enable riscv64 via QEMU-based builds on Ubuntu 24.04, consistent with existing ppc64le and s390x support. - Skip musllinux builds, as RISE does not provide musllinux NumPy wheels. - Test manylinux wheels using the NumPy wheels provided by RISE. [1]: numpy/numpy#30216 [2]: https://riseproject.gitlab.io/python/wheel_builder/packages/numpy Signed-off-by: Julien Stephan <[email protected]>
1 parent a261cd6 commit 678e07c

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎.github/workflows/build_wheels.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
arch: aarch64
3333
- os: ubuntu-24.04
3434
arch: ppc64le
35+
- os: ubuntu-24.04
36+
arch: riscv64
3537
- os: ubuntu-24.04
3638
arch: s390x
3739
- os: ubuntu-24.04

‎pyproject.toml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ setup = [
9090
[tool.cibuildwheel]
9191
build = "cp{311,312,313,313t,314,314t}-* pp311-*"
9292
enable = ["cpython-freethreading", "pypy", "cpython-prerelease"]
93-
skip = "*-musllinux_{ppc64le,s390x}"
93+
skip = "*-musllinux_{ppc64le,riscv64,s390x}"
9494
test-requires = "pytest"
9595
test-command = [
9696
'python -c "from contourpy.util import build_config; from pprint import pprint; pprint(build_config())"',
@@ -108,6 +108,13 @@ config-settings.setup-args = [
108108
"-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
109109
]
110110

111+
[[tool.cibuildwheel.overrides]]
112+
select = "*riscv64*"
113+
# numpy does not provide riscv64 wheel yet. See https://github.com/numpy/numpy/issues/30216
114+
# RISE is building and distributing popular wheels for riscv64 such as numpy
115+
# Let's install from rise project for now: https://riseproject.gitlab.io/python/wheel_builder/packages/numpy
116+
# Note: only manylinux wheel available (no musllinux)
117+
before-test = "python -m pip install -v --only-binary=:all: --extra-index-url https://gitlab.com/api/v4/projects/riseproject%2Fpython%2Fwheel_builder/packages/pypi/simple numpy "
111118

112119
[tool.codespell]
113120
ignore-words-list = "nd,socio-economic"

0 commit comments

Comments
 (0)