Skip to content

hdrhistogram: add build-hdrhistogram.yml for riscv64 wheels - #1397

Merged
luhenry merged 2 commits into
mainfrom
hdrhistogram
Sep 7, 2026
Merged

hdrhistogram: add build-hdrhistogram.yml for riscv64 wheels#1397
luhenry merged 2 commits into
mainfrom
hdrhistogram

Conversation

@luhenry

@luhenry luhenry commented Sep 7, 2026

Copy link
Copy Markdown
Member

Compiles 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

  • Nothing beyond the riscv64 image.

Testing

  • Stages test conftest.py tox.ini via CIBW_TEST_SOURCES so the checkout's hdrh/ package can't shadow the wheel's compiled extension, and so upstream's default perf-test skip and marker registration still apply.
  • Wheel license-file check expects LICENSE only, not AUTHORS: our shallow single-tag checkout gives pbr no git history to regenerate AUTHORS from, 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_encode hardcodes 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.

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.
@luhenry
luhenry merged commit 1d548dc into main Sep 7, 2026
16 checks passed
@luhenry
luhenry deleted the hdrhistogram branch September 7, 2026 17:36
@luhenry luhenry linked an issue Sep 7, 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.

hdrhistogram riscv64 support

1 participant