Conversation
lefthook's PyPI wheels are hatchling builds that repackage a prebuilt, statically-linked Go binary per platform (see packaging/registries/pypi/hatch_build.py upstream); there is no sdist to build from, only 6 platform wheels. Go's own riscv64 cross-compilation (CGO_ENABLED=0, no assembly, no purego/cgo_import_dynamic in the dependency graph) produces a static riscv64 binary with no ELF interpreter, so gotcha 124's ld-linux fix does not even apply here. The build mirrors upstream's own publish-pypi job: cross-compile the same "no_self_update" build id upstream's release.yml/goreleaser produces, stage it under lefthook/bin/lefthook-linux-riscv64/, and run `uv build --wheel` with the same LEFTHOOK_TARGET_PLATFORM/ARCH env vars publish.raku sets per platform. hatch_build.py's PEP425_TAGS table has no riscv64 entry, so patches/lefthook/2.1.11/ adds one (py3-none-manylinux_2_39_riscv64, matching this repo's riscv64 image). Tested by installing a real pre-commit hook and running `git commit` on riscv64 hardware, proving the bundled binary executes end to end.
luhenry
added a commit
that referenced
this pull request
Sep 24, 2026
Contributor
|
This branch has not been deployed
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.
lefthook2.1.11Repackages a prebuilt, statically-linked Go CLI binary as a py3-none platform wheel. Upstream publishes no riscv64 wheel.
Mirrors upstream's
release.ymlpublish-pypijob and itspackaging/scripts/lib/Registries/PyPI.rakumod.Differs from upstream
Testing
pre-commithook and runsgit commit, proving the bundled riscv64 binary executes end to end.License: OK
Patches
0001-add-riscv64-to-the-PyPI-wheel-platform-tag-table.patch- To upstream (no riscv64 CI to exercise it yet). Without it the build falls back to a universalpy3-none-anytag that would misrepresent a riscv64-only binary as portable.Smoke-tested across cp312/cp313/cp314/cp314t: hook installs and fires on every interpreter.