Conversation
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.
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
.github/workflows/build-hiredis.yml, building riscv64 wheels for hiredis 3.4.1 forcp312,cp313,cp314andcp314t.The workflow mirrors the
build_wheelsjob of upstream's REUSABLE-wheeler.yaml, narrowed tomanylinux_riscv64: check outredis/hiredis-pyat the tag with submodules (the hiredis C library isvendor/hiredis), then runpypa/cibuildwheel. hiredis-py has nopyproject.tomland therefore no[tool.cibuildwheel]table, soCIBW_MANYLINUX_RISCV64_IMAGEand 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 viaCIBW_TEST_SOURCES: testsso the checkout's ownhiredis/package cannot shadow the installed wheel.pytest-memrayis dropped fromdev_requirements.txt: it is sdist-only on PyPI with no riscv64 build, and its single use is a@pytest.mark.limit_memorymarker on one test, which still runs (unmarked) without it.Licensing
setup.pycompilesvendor/hiredis(hiredis v1.4.1, BSD 3-clause) directly into thehiredis.hiredisextension, but the wheel ships only the package's own MITLICENSE—vendor/hiredis/COPYINGis not at the project root, so setuptools' defaultlicense_filesglob 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...whlcontainshiredis-3.4.1.dist-info/licenses/LICENSEand nothing else.patches/hiredis/3.4.1/0001-add-the-vendored-hiredis-licence-next-to-the-package.patchcopies the vendored notice to the root asLICENSE.hiredis, which the defaultLICEN[CS]E*glob picks up with no packaging change. The test command asserts that bothLICENSEandLICENSE.hiredisare present in the installed wheel'sdist-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
actionlintis clean apart from the expectedlabel "ubuntu-24.04-riscv" is unknown. A patched build on the host produced a wheel carrying bothdist-info/licenses/LICENSEanddist-info/licenses/LICENSE.hiredis, and the staged-tests/installed-wheel arrangement the workflow uses ran 64 passed. The version comes fromhiredis/version.py, notsetuptools_scm, so the dirty tree left bygit applydoes not rename the wheel.