hdrhistogram: add build-hdrhistogram.yml for riscv64 wheels - #1397
Merged
Conversation
Builds riscv64 wheels for the HdrHistogram_py C accelerator (pyhdrh, compiled from src/python-codec.c), mirroring upstream's own cibuildwheel matrix (cp310-cp314, glibc and musl) with no build-time or runtime native dependencies.
luhenry
added a commit
that referenced
this pull request
Sep 7, 2026
…out-vs-sdist licence set) manylinux jobs failed test_hist_encode: the manylinux_2_39_riscv64 image links zlib-ng 1.3.1, which compresses the varint payload to 4 bytes more than the hardcoded expected length (calibrated against an older zlib); musllinux's vanilla zlib 1.3.2 matches it exactly. Reproduced natively on manylinux_2_39_aarch64 and musllinux_1_2_aarch64 (same distro/zlib builds, no emulation) to confirm this is a zlib-build artifact, not riscv64- or architecture-specific - the LEB128/zigzag payload pyhdrh produces is identical across every architecture tested. Patches the test to tolerate compressed-size variance and to also verify a decode round-trip. musllinux jobs failed the wheel-contents check: our build-from-checkout shape (shallow single-tag clone) never gives pbr enough git history to regenerate AUTHORS the way upstream's own full-history sdist build does, so the wheel carries LICENSE only. Verified with a single clean isolated build (matching cibuildwheel's own build path) on both manylinux and musllinux; adjusted the check accordingly.
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.
hdrhistogram0.10.7Compiles
pyhdrh, a small C accelerator (src/python-codec.c) used by the log codec. Upstream publishes no riscv64 wheel.Mirrors upstream's
python-publish.yml.Differs from upstream
Testing
test conftest.py tox.iniviaCIBW_TEST_SOURCESso the checkout'shdrh/package can't shadow the wheel's compiled extension, and so upstream's default perf-test skip and marker registration still apply.LICENSEonly, notAUTHORS: our shallow single-tag checkout gives pbr no git history to regenerateAUTHORSfrom, unlike upstream's own full-history sdist build.License: OK.
Patches
0001-relax-the-exact-zlib-compressed-length-assertion-in.patch- To upstream [can't file cross-repo].test_hist_encodehardcodes an exact zlib-compressed length; the manylinux image's zlib-ng 1.3.1 compresses 4 bytes larger than the value it was calibrated against. Reproduces on aarch64 too (same image family), not riscv64-only.Built and tested inside the real manylinux/musllinux riscv64 images (via aarch64, no emulation) and in CI; 51 passed, 2 skipped on every job.