diff --git a/docs/packages/lefthook.yaml b/docs/packages/lefthook.yaml index f1bb0b2724e..de9c8b4ba5f 100644 --- a/docs/packages/lefthook.yaml +++ b/docs/packages/lefthook.yaml @@ -23,3 +23,4 @@ versions: - filename: lefthook-2.1.14-py3-none-manylinux_2_39_riscv64.whl sha256: a029fb0ff697f8535c65eb90419749bae14ece18da35e73d6ea1c08d9991bd15 requires-python: '>=3.6' +- version: 2.1.15 diff --git a/patches/lefthook/2.1.15/0001-add-riscv64-to-the-PyPI-wheel-platform-tag-table.patch b/patches/lefthook/2.1.15/0001-add-riscv64-to-the-PyPI-wheel-platform-tag-table.patch new file mode 100644 index 00000000000..21013d7c908 --- /dev/null +++ b/patches/lefthook/2.1.15/0001-add-riscv64-to-the-PyPI-wheel-platform-tag-table.patch @@ -0,0 +1,43 @@ +From 57fc962c40b51418965084d5e22e31a5abcd1268 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Thu, 24 Sep 2026 06:45:00 +0000 +Subject: [PATCH] add riscv64 to the PyPI wheel platform-tag table + +Upstream-Status: To upstream [not submitted yet: lefthook has no riscv64 CI runner, so a drive-by PR could not be exercised by upstream's own release workflow; needs a maintainer discussion first] + +hatch_build.py's PEP425_TAGS dict maps (platform, arch) to the wheel's +PEP 425 tag, keyed off LEFTHOOK_TARGET_PLATFORM/LEFTHOOK_TARGET_ARCH (or +the host's own sys.platform/platform.machine() when unset). It only +knows the six platforms upstream's own publish.raku loop builds for, so +building with LEFTHOOK_TARGET_PLATFORM=linux LEFTHOOK_TARGET_ARCH=riscv64 +falls through to "no PEP425 tag" and produces a universal py3-none-any +wheel that would wrongly claim to work on every platform while bundling +a riscv64-only binary. + +Add ("linux", "riscv64") -> "py3-none-manylinux_2_39_riscv64", matching +the manylinux_riscv64 image this project's own riscv64 wheel builds run +in. ARCH_MAPPING and main.py's copy of it need no change: platform.machine() +already reports "riscv64" verbatim on that architecture, which is also +the directory name the binary is shipped under (lefthook/bin/lefthook-linux-riscv64/). +Existing platforms resolve unchanged. + +Signed-off-by: Ludovic Henry +--- + packaging/registries/pypi/hatch_build.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/packaging/registries/pypi/hatch_build.py b/packaging/registries/pypi/hatch_build.py +index a296e30..5e060fd 100644 +--- a/packaging/registries/pypi/hatch_build.py ++++ b/packaging/registries/pypi/hatch_build.py +@@ -30,6 +30,7 @@ ARCH_MAPPING = { + PEP425_TAGS = { + ("linux", "x86_64"): "py3-none-manylinux_2_17_x86_64", + ("linux", "arm64"): "py3-none-manylinux_2_17_aarch64", ++ ("linux", "riscv64"): "py3-none-manylinux_2_39_riscv64", + ("darwin", "x86_64"): "py3-none-macosx_10_15_x86_64", + ("darwin", "arm64"): "py3-none-macosx_11_0_arm64", + ("windows", "x86_64"): "py3-none-win_amd64", +-- +2.43.0 +