Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/packages/lefthook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ versions:
- filename: lefthook-2.1.11-py3-none-manylinux_2_39_riscv64.whl
sha256: 31a4a6b5dcd4862eb8a1ad42b45fc795a313fed7991af26e78bbe7e9890fe668
requires-python: '>=3.6'
- version: 2.1.12
- version: 2.1.14
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 57fc962c40b51418965084d5e22e31a5abcd1268 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
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 <git@ludovic.dev>
---
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

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 57fc962c40b51418965084d5e22e31a5abcd1268 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
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 <git@ludovic.dev>
---
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

Loading