Skip to content

zstandard: build wheels for riscv64#161

Open
gounthar wants to merge 2 commits into
mainfrom
zstandard-riscv64
Open

zstandard: build wheels for riscv64#161
gounthar wants to merge 2 commits into
mainfrom
zstandard-riscv64

Conversation

@gounthar

@gounthar gounthar commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Adds a riscv64 wheel build for zstandard, modeled on build-numpy.yml. First package I'm adding since converging my own wheel set into RISE, so tell me if I've missed a house convention.

Why zstandard. No riscv64 wheels on PyPI (0.25.0 ships every arch except riscv64), and it's a common dependency, so riscv64 users build it from source today. Upstream's release matrix covers aarch64/x86_64/ppc64le/s390x but not riscv64.

What's here.

  • .github/workflows/build-zstandard.yml: cibuildwheel on ubuntu-24.04-riscv, same shape as numpy (build then publish, publish gated on main).
  • zstandard added to ci_scripts/packages.txt.

Porting notes.

  • CIBW_BUILD: <py>-manylinux_riscv64 (manylinux only, musl skipped by construction).
  • The 0.25.0 tag pins enable = ["cpython-freethreading", "cpython-prerelease"] and targets cibuildwheel 3.x. The pinned cibuildwheel 4.1.0 removed the cpython-freethreading group (freethreaded builds are default in 4.x) and errors on it at config-parse, so a small pre-build step strips it. cp314t still builds. Upstream HEAD already dropped it, so this only applies to this tag.
  • zstandard tags aren't v-prefixed (unlike numpy), so the checkout ref is the bare version.
  • Build frontend: upstream pins build[uv]. The current manylinux_2_39_riscv64 image ships uv, so I'm letting build[uv] run rather than forcing plain build, to confirm it works on riscv64 (this is the open question from the dev-guide review on python-wheels: add a development guide #159).

Still watching. ZSTD_WARNINGS_AS_ERRORS=1 is set in upstream's cibuildwheel env, so the strict build could trip on a riscv64-specific warning (my local build used plain pip wheel, which doesn't set it). Test extras (test-groups = ["dev"], xdist) are the other likely hurdle.

Kept it minimal on purpose (no ccache, unlike numpy) since the build is quick.

Trigger: zstandard:0.25.0

gounthar added 2 commits July 14, 2026 18:10
Add a riscv64 wheel build for zstandard, modeled on build-numpy.yml, and
register the package in ci_scripts/packages.txt.

zstandard ships no riscv64 wheels on PyPI (0.25.0 covers every arch except
riscv64) and is a common dependency, so riscv64 users build it from source
today.

riscv64 specifics:
- CIBW_BUILD restricted to <py>-manylinux_riscv64 (musl skipped by
  construction).
- CIBW_BUILD_FRONTEND forced to `build`: upstream pins `build[uv]` in
  pyproject.toml, which fails on riscv64 because uv is absent from the
  manylinux_riscv64 image.
- Checkout ref is the bare version, since zstandard tags are not v-prefixed.

Signed-off-by: Bruno Verachten <[email protected]>
The 0.25.0 tag pins enable = ["cpython-freethreading", "cpython-prerelease"]
and targets cibuildwheel 3.x. RISE pins cibuildwheel 4.1.0, which removed the
cpython-freethreading group (freethreaded builds are default now) and errors on
it at config-parse. Strip that group so 4.1.0 can read the config.

Also drop the CIBW_BUILD_FRONTEND override: the manylinux_2_39_riscv64 image
now ships uv, so let upstream's build[uv] frontend run and confirm it works on
riscv64 rather than forcing the plain build frontend.

Signed-off-by: Bruno Verachten <[email protected]>
@gounthar gounthar marked this pull request as ready for review July 14, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant