Skip to content

Commit 1bb07d8

Browse files
committed
Add minimal reproduction with rules_python 1.6.3 (works)
This setup demonstrates the working state with rules_python 1.6.3. Building gRPC's cython target succeeds: bazel build @com_github_grpc_grpc//src/python/grpcio/grpc/_cython:cygrpc.pyx_cython_translation
0 parents  commit 1bb07d8

File tree

5 files changed

+40
-0
lines changed

5 files changed

+40
-0
lines changed

.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Use WORKSPACE mode, not bzlmod
2+
common --enable_bzlmod=false

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.4.1

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Bazel
2+
bazel-*
3+
MODULE.bazel
4+
MODULE.bazel.lock

BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Empty BUILD file for workspace root

WORKSPACE

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
workspace(name = "rules_python_3495_repro")
2+
3+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4+
5+
# rules_python 1.6.3 - works fine
6+
http_archive(
7+
name = "rules_python",
8+
sha256 = "2f5c284fbb4e86045c2632d3573fc006facbca5d1fa02976e89dc0cd5488b590",
9+
strip_prefix = "rules_python-1.6.3",
10+
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.3/rules_python-1.6.3.tar.gz",
11+
)
12+
13+
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
14+
15+
py_repositories()
16+
17+
python_register_toolchains(
18+
name = "python3_9",
19+
python_version = "3.9",
20+
)
21+
22+
# gRPC - its cython build triggers the issue
23+
http_archive(
24+
name = "com_github_grpc_grpc",
25+
sha256 = "afbc5d78d6ba6d509cc6e264de0d49dcd7304db435cbf2d630385bacf49e066c",
26+
strip_prefix = "grpc-1.68.2",
27+
urls = ["https://github.com/grpc/grpc/archive/refs/tags/v1.68.2.tar.gz"],
28+
)
29+
30+
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
31+
32+
grpc_deps()

0 commit comments

Comments
 (0)