1+ From 793dddf2458403e7f0ce8a923584ec5b770d3f68 Mon Sep 17 00:00:00 2001
12From: Levi Zim <
[email protected] >
2- Date: Tue, 14 Oct 2025 19:45:36 +0800
3- Subject: [PATCH] fix: Add linux_riscv64 to _pip_repository_impl
3+ Date: Sun, 26 Oct 2025 12:35:53 +0800
4+ Subject: [PATCH] fix: Add linux_riscv64 to _pip_repository_impl (#3350)
45
5- Fix https://github.com/bazel-contrib/rules_python/discussions/2729
6+ Add `linux_riscv64` support for pulling pip dependencies. This is not
7+ adding any hermetic toolchain support - user has to provide a working
8+ toolchain.
9+
10+ Fix #2729
11+
12+ - --------
13+
14+ Co-authored-by: Ignas Anikevicius <
[email protected] >
615---
7- python/private/pypi/pip_repository.bzl | 1 +
8- python/private/pypi/whl_installer/platform.py | 3 +++
9- python/private/pypi/whl_target_platforms.bzl | 1 +
10- tests/pypi/whl_installer/platform_test.py | 6 +++---
11- .../whl_target_platforms/whl_target_platforms_tests.bzl | 9 + ++++++++
12- 5 files changed, 17 insertions(+), 3 deletions(-)
16+ python/private/pypi/pip_repository.bzl | 1 +
17+ python/private/pypi/whl_installer/platform.py | 3 +++
18+ python/private/pypi/whl_target_platforms.bzl | 1 +
19+ tests/pypi/whl_installer/platform_test.py | 6 +++---
20+ .../whl_target_platforms/whl_target_platforms_tests.bzl | 8 ++++++++
21+ 5 files changed, 16 insertions(+), 3 deletions(-)
1322
1423diff --git a/python/private/pypi/pip_repository.bzl b/python/private/pypi/pip_repository.bzl
1524index e9a4c44da3..d635651039 100644
@@ -82,7 +91,7 @@ index ad65650779..0d944bb196 100644
8291
8392 def test_platform_sort(self):
8493diff --git a/tests/pypi/whl_target_platforms/whl_target_platforms_tests.bzl b/tests/pypi/whl_target_platforms/whl_target_platforms_tests.bzl
85- index a976a0cf95..8b7f0ad02b 100644
94+ index a976a0cf95..6bec26c10c 100644
8695--- a/tests/pypi/whl_target_platforms/whl_target_platforms_tests.bzl
8796+++ b/tests/pypi/whl_target_platforms/whl_target_platforms_tests.bzl
8897@@ -34,6 +34,9 @@ def _test_simple(env):
@@ -105,23 +114,15 @@ index a976a0cf95..8b7f0ad02b 100644
105114 "win_amd64": [
106115 struct(os = "windows", cpu = "x86_64", abi = "cp311", target_platform = "cp311_windows_x86_64", version = (0, 0)),
107116 ],
108- @@ -96,6 +102,7 @@ def _can_parse_existing_tags(env):
109- "manylinux2014_i686": 1,
110- "manylinux2014_ppc64": 1,
111- "manylinux2014_ppc64le": 1,
112- + "manylinux2014_riscv64": 1,
113- "manylinux2014_s390x": 1,
114- "manylinux2014_x86_64": 1,
115- "manylinux_11_12_aarch64": 1,
116- @@ -103,6 +110,7 @@ def _can_parse_existing_tags(env):
117+ @@ -103,6 +109,7 @@ def _can_parse_existing_tags(env):
117118 "manylinux_11_12_i686": 1,
118119 "manylinux_11_12_ppc64": 1,
119120 "manylinux_11_12_ppc64le": 1,
120121+ "manylinux_11_12_riscv64": 1,
121122 "manylinux_11_12_s390x": 1,
122123 "manylinux_11_12_x86_64": 1,
123124 "manylinux_1_2_aarch64": 1,
124- @@ -111,6 +119 ,7 @@ def _can_parse_existing_tags(env):
125+ @@ -111,6 +118 ,7 @@ def _can_parse_existing_tags(env):
125126 "musllinux_11_12_armv7l": 1,
126127 "musllinux_11_12_i686": 1,
127128 "musllinux_11_12_ppc64le": 1,
0 commit comments