Skip to content

Commit b205a35

Browse files
committed
grpcio: 1.78.0: patch relative path regression
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
1 parent 0728d74 commit b205a35

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
From 052eae2d33743cf67847521309c0201dc0bee9aa Mon Sep 17 00:00:00 2001
2+
From: Trevor Gamblin <tgamblin@baylibre.com>
3+
Date: Wed, 19 Aug 2026 12:59:15 -0400
4+
Subject: [PATCH] grpcio_tests: anchor GatherProto's proto paths to GRPC_STEM
5+
6+
commands.py's GRPC_PROTO_STEM/PROTO_STEM/PYTHON_PROTO_TOP_LEVEL were made
7+
cwd-relative by the pyproject.toml migration (#40833), which is fine for
8+
the new PEP517 build path (BuildPackageProtos), but breaks the legacy
9+
"preprocess" command (GatherProto) used by
10+
tools/distrib/install_all_python_modules.sh. That script pushd's into
11+
src/python/grpcio_tests before invoking `setup.py preprocess`, so the
12+
relative path "src/proto" no longer resolves:
13+
14+
running preprocess
15+
error: [Errno 2] No such file or directory: 'src/proto'
16+
17+
Upstream-Status: To upstream
18+
19+
AI-Generated: Uses Claude Sonnet 5
20+
21+
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
22+
---
23+
src/python/grpcio_tests/commands.py | 6 +++---
24+
1 file changed, 3 insertions(+), 3 deletions(-)
25+
26+
diff --git a/src/python/grpcio_tests/commands.py b/src/python/grpcio_tests/commands.py
27+
index 997bd2a906..d3bbd0f733 100644
28+
--- a/src/python/grpcio_tests/commands.py
29+
+++ b/src/python/grpcio_tests/commands.py
30+
@@ -32,9 +32,9 @@ from setuptools.command import test
31+
PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
32+
GRPC_STEM = os.path.abspath(PYTHON_STEM + "../../../../")
33+
PYTHON_REL_PATH = os.path.relpath(PYTHON_STEM, start=GRPC_STEM)
34+
-GRPC_PROTO_STEM = os.path.join("src", "proto")
35+
-PROTO_STEM = os.path.join(PYTHON_REL_PATH, "src", "proto")
36+
-PYTHON_PROTO_TOP_LEVEL = os.path.join(PYTHON_REL_PATH, "src")
37+
+GRPC_PROTO_STEM = os.path.join(GRPC_STEM, "src", "proto")
38+
+PROTO_STEM = os.path.join(GRPC_STEM, PYTHON_REL_PATH, "src", "proto")
39+
+PYTHON_PROTO_TOP_LEVEL = os.path.join(GRPC_STEM, PYTHON_REL_PATH, "src")
40+
41+
42+
class CommandError(object):
43+
--
44+
2.55.0
45+

0 commit comments

Comments
 (0)