Skip to content

dulwich: add build-dulwich.yml for riscv64 wheels - #360

Merged
luhenry merged 2 commits into
mainfrom
dulwich
Aug 25, 2026
Merged

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

Conversation

@luhenry

@luhenry luhenry commented Aug 25, 2026

Copy link
Copy Markdown
Member

Adds a riscv64 wheel build for dulwich 1.2.13.

dulwich publishes per-interpreter compiled wheels (cp3XX-cp3XX-manylinux_2_28_*) built
from three setuptools-rust/PyO3 crates (dulwich._objects, ._pack, ._diff_tree)
alongside a py3-none-any pure fallback — but no riscv64 ones. Matrix is therefore
per-interpreter [cp312, cp313, cp314, cp314t], not abi3.

Upstream already ships a [tool.cibuildwheel] table (rustup + libatomic before-build,
*-musllinux_* skipped, PATH=$HOME/.cargo/bin:$PATH), so this is a plain
build-from-checkout with CIBW_MANYLINUX_RISCV64_IMAGE as the only build override.
Verified in the image that yum -y install libatomic resolves on Rocky 10 riscv64.

Testing

Upstream's python-distributions.yml never tests the wheels it builds, so the test phase
mirrors pythontest.yml / make check instead: tests.test_suite, which is the
self-tests plus the tutorial doctests plus the compat suite run against the real git
binary (2.54.0 in the image).

CIBW_TEST_EXTRAS is upstream's set minus paramiko and colordiff (nothing under
tests/ imports either) and patiencediff (no riscv64 wheel; test_patch skips without
it). Everything left is pure Python, so no extra index is needed.

Two wrinkles come from running that suite against an installed wheel rather than
upstream's in-place build_ext -i, both arch-independent:

  • dulwich/tests/utils.py resolves testdata/ as <dulwich package>/../../testdata, and
    tests/test_source.py walks <cwd>/dulwich — so the installed package is staged where
    the checkout's would be. Without it 95 tests error out.
  • test_local_modifications_ioerror chmods a file to 0 and asserts reading raises;
    root inside the build container reads it anyway. It is the only test dropped.

Validated locally on aarch64 against upstream's own manylinux wheel (same shape, no
compilation involved): 4619 passed, 172 skipped, 1 expected failure.

The wheel carries dulwich-1.2.13.dist-info/licenses/COPYING (Apache-2.0 OR
GPL-2.0-or-later), confirmed in the published upstream wheel.

dulwich publishes per-interpreter compiled wheels built from three
setuptools-rust/PyO3 crates; PyPI ships no riscv64 ones. Upstream already
carries a [tool.cibuildwheel] table (rustup + libatomic before-build, musl
skipped), so the workflow is a plain build-from-checkout with the riscv64
image as the only build override.

Upstream's cibuildwheel run does not test the wheels, so the test phase
mirrors pythontest.yml / `make check` instead: upstream's extras (minus
paramiko/colordiff, which tests/ never imports, and patiencediff, which has
no riscv64 wheel) and the full `tests.test_suite`, 4619 tests including the
compat suite against git and the tutorial doctests.

Two riscv-independent wrinkles come from running that suite against an
installed wheel rather than an in-place build: the suite locates testdata/
and the source tree relative to the dulwich package directory, and
test_local_modifications_ioerror asserts a mode-0 file is unreadable, which
never holds for root inside the build container.
tests/test_signature.py's GetSignatureVendor* cases call
get_signature_vendor(format='ssh'/'x509'), which raises ValueError unless
shutil.which() finds ssh-keygen / gpgsm. Upstream's ubuntu-latest runners
have both; the manylinux_2_39_riscv64 image does not, so six tests errored
on every interpreter. Install them rather than deselecting - the CLIs are
what the vendors under test actually shell out to.
@luhenry
luhenry merged commit 610c072 into main Aug 25, 2026
8 checks passed
@luhenry
luhenry deleted the dulwich branch August 25, 2026 16:01
@luhenry luhenry linked an issue Aug 25, 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.

dulwich riscv64 support

1 participant