Skip to content

hiredis: add build-hiredis.yml for riscv64 wheels - #478

Merged
luhenry merged 1 commit into
mainfrom
hiredis
Aug 26, 2026
Merged

hiredis: add build-hiredis.yml for riscv64 wheels#478
luhenry merged 1 commit into
mainfrom
hiredis

Conversation

@luhenry

@luhenry luhenry commented Aug 26, 2026

Copy link
Copy Markdown
Member

Adds .github/workflows/build-hiredis.yml, building riscv64 wheels for hiredis 3.4.1 for cp312, cp313, cp314 and cp314t.

The workflow mirrors the build_wheels job of upstream's REUSABLE-wheeler.yaml, narrowed to manylinux_riscv64: check out redis/hiredis-py at the tag with submodules (the hiredis C library is vendor/hiredis), then run pypa/cibuildwheel. hiredis-py has no pyproject.toml and therefore no [tool.cibuildwheel] table, so CIBW_MANYLINUX_RISCV64_IMAGE and the test invocation are supplied here. musllinux is left out, matching the rest of this repo.

Upstream's wheel job runs no tests at all, so the test command is the suite upstream runs in integration.yaml (python -m pytest, 64 tests), staged via CIBW_TEST_SOURCES: tests so the checkout's own hiredis/ package cannot shadow the installed wheel. pytest-memray is dropped from dev_requirements.txt: it is sdist-only on PyPI with no riscv64 build, and its single use is a @pytest.mark.limit_memory marker on one test, which still runs (unmarked) without it.

Licensing

setup.py compiles vendor/hiredis (hiredis v1.4.1, BSD 3-clause) directly into the hiredis.hiredis extension, but the wheel ships only the package's own MIT LICENSEvendor/hiredis/COPYING is not at the project root, so setuptools' default license_files glob never sees it, and the BSD terms require the copyright notice to be reproduced with binary redistributions. Verified against upstream's released wheels: hiredis-3.4.1-cp313-cp313-manylinux2014_aarch64...whl contains hiredis-3.4.1.dist-info/licenses/LICENSE and nothing else.

patches/hiredis/3.4.1/0001-add-the-vendored-hiredis-licence-next-to-the-package.patch copies the vendored notice to the root as LICENSE.hiredis, which the default LICEN[CS]E* glob picks up with no packaging change. The test command asserts that both LICENSE and LICENSE.hiredis are present in the installed wheel's dist-info/licenses/, so the patch cannot silently stop applying. Upstream-Status: To upstream — the same gap exists in every hiredis wheel on PyPI, so it needs a maintainer discussion rather than a drive-by PR; I found no existing upstream issue or PR covering it.

Local validation

actionlint is clean apart from the expected label "ubuntu-24.04-riscv" is unknown. A patched build on the host produced a wheel carrying both dist-info/licenses/LICENSE and dist-info/licenses/LICENSE.hiredis, and the staged-tests/installed-wheel arrangement the workflow uses ran 64 passed. The version comes from hiredis/version.py, not setuptools_scm, so the dirty tree left by git apply does not rename the wheel.

Mirrors the `build_wheels` job of upstream's REUSABLE-wheeler.yaml, narrowed
to manylinux_riscv64. hiredis-py has no [tool.cibuildwheel] table, so the
image and the test invocation are supplied here; the test suite is the one
upstream runs in integration.yaml, minus pytest-memray, which has no riscv64
build.

The wheel statically compiles vendor/hiredis (hiredis v1.4.1, BSD 3-clause)
but ships only the package's own MIT LICENSE, so a patch adds the vendored
notice at the project root where setuptools' default license_files glob picks
it up. The test command asserts both licences are present in the installed
wheel so the patch cannot silently stop applying.
@luhenry
luhenry merged commit b0729a6 into main Aug 26, 2026
8 checks passed
@luhenry
luhenry deleted the hiredis branch August 26, 2026 19:22
@luhenry luhenry linked an issue Aug 26, 2026 that may be closed by this pull request
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.

hiredis riscv64 support

1 participant