zstandard: build wheels for riscv64#161
Open
gounthar wants to merge 2 commits into
Open
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 onubuntu-24.04-riscv, same shape as numpy (build then publish, publish gated onmain).zstandardadded toci_scripts/packages.txt.Porting notes.
CIBW_BUILD: <py>-manylinux_riscv64(manylinux only, musl skipped by construction).enable = ["cpython-freethreading", "cpython-prerelease"]and targets cibuildwheel 3.x. The pinned cibuildwheel 4.1.0 removed thecpython-freethreadinggroup (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.v-prefixed (unlike numpy), so the checkout ref is the bare version.build[uv]. The current manylinux_2_39_riscv64 image ships uv, so I'm lettingbuild[uv]run rather than forcing plainbuild, 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=1is set in upstream's cibuildwheel env, so the strict build could trip on a riscv64-specific warning (my local build used plainpip 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