Conversation
fastavro publishes per-interpreter Cython-compiled manylinux/musllinux wheels for every architecture but riscv64. Mirror the `build-wheels` job of upstream's build_linux.yml, narrowed to manylinux_riscv64: check out the tag and hand it to cibuildwheel, which cythonizes in-container via the Cython in build-system.requires (upstream's host-side `make all` only exists to keep cython off their QEMU emulation). Testing follows upstream's run-tests.sh pytest invocation rather than their CI, which tests the checkout and never tests the built wheel: CIBW_TEST_SOURCES stages only tests/ and pytest.ini so the repo-root fastavro/ cannot shadow the installed extension modules, and upstream's own is_testing_cython_modules() asserts the compiled modules are what got imported. 697 tests pass, 11 skip. Two deviations, both justified in the file: - cramjam has no riscv64 wheel anywhere, so Rust is installed in the container and it builds from its maturin sdist (31s on an arm64 host). It is not optional: tests/test_fastavro.py raises pytest.skip from the generator feeding test_file's parametrize when snappy is unavailable, which aborts collection of that whole module - 152 of the suite's 709 tests, including most of the core reader/writer coverage. - test_regular_vs_ordered_dict_record_typeerror asserts on the source line of a traceback frame. Cython embeds the relative path fastavro/_write.pyx, so the assertion only holds when the cwd is a checkout with a build_ext --inplace; against any installed wheel it reads back an empty line. Reproduced on macOS/arm64, so it is an upstream in-place-build assumption, not a riscv64 defect. pandas has no free-threaded riscv64 wheel on our registry, so the cp314t entry drops it and deselects the single test that imports it; the GIL-ful entries pin below 3.0.4, the newest build we host (pip would otherwise pick PyPI's 3.0.5 and try to compile it from sdist).
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-fastavro.yml, building fastavro 1.12.2 riscv64 wheels forcp312/cp313/cp314/cp314t.fastavro publishes per-interpreter Cython-compiled manylinux/musllinux wheels for every architecture except riscv64. The workflow mirrors the
build-wheelsjob of upstream'sbuild_linux.yml, narrowed tomanylinux_riscv64: check out the tag, hand it to cibuildwheel, which cythonizes in-container from theCythoninbuild-system.requires. Upstream's host-sidemake allexists only to keep cython off their QEMU emulation and is a no-op for wheel content, so it is dropped.Testing
Upstream's CI tests the checkout (
run-tests.sh:build_ext --inplace+pip install -e .) and never tests the built wheel, so the test step reproduces their pytest invocation against the installed wheel instead:CIBW_TEST_SOURCES: tests pytest.inistages only the suite, so the repo-rootfastavro/cannot shadow the installed extension modules (tests/is a package with relative imports, so pytest's rootdir insertion would otherwise win).is_testing_cython_modules()is chained ahead of pytest as the proof that the compiled modules — not the pure-Python fallback — are what got imported, alongside a step asserting all six.soare in the wheel.697 passed, 11 skipped in a local dry run of the exact test command against a locally built wheel (macOS/arm64, Cython 3.3.0 — which compiles fastavro 1.12.2 cleanly, so no version ceiling is needed).
Two deviations
cramjam is built from source in-container. It has no riscv64 wheel anywhere, so Rust is installed via
CIBW_BEFORE_ALL_LINUXand pip builds its maturin sdist (31s on an arm64 host). It is not optional:tests/test_fastavro.pyraisespytest.skipfrom the generator feedingtest_file'sparametrizewhen snappy is unavailable, which aborts collection of that entire module — 152 of the suite's 709 tests, including most of the core reader/writer coverage.test_regular_vs_ordered_dict_record_typeerroris deselected. It asserts on the source line of a traceback frame; Cython embeds the relative pathfastavro/_write.pyx, so the assertion only holds when the cwd is a checkout carrying abuild_ext --inplacebuild. Against any installed wheel it reads back an empty line. Reproduced on macOS/arm64 — an upstream in-place-build assumption, not a riscv64 defect.Test dependencies
numpy,pandasandlz4come frompypi.riseproject.devviaPIP_EXTRA_INDEX_URL;backports.zstdhas riscv64 wheels on PyPI (and is only needed below 3.14, which hascompression.zstdin the stdlib);zlib_ngbuilds from sdist with the image's configure/make.The registry hosts no free-threaded
pandas, so thecp314tmatrix entry drops it and deselects the one test that imports it. The GIL-ful entries pinpandas<3.0.4, the newest build we host — without the ceiling pip resolves PyPI's 3.0.5 across both indexes and tries to compile it from sdist.Licensing
The wheel carries
LICENSEandNOTICE.txtindist-info/licenses/; nothing third-party is vendored or linked beyond the Cython-generated C.