Skip to content

Commit b6d3d0f

Browse files
authored
Merge pull request #32 from pubref/py_greeter_client_clarification
Clarifies the use of greeter_client.py with grpc.
2 parents 2ba8dee + 342e241 commit b6d3d0f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

examples/helloworld/python/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
package(default_visibility = ["//visibility:public"])
22

3+
# Note: python grpc functionality in rules_protobuf is very
4+
# experimental. There is currently no support for fetching the
5+
# platform-specific grpcio wheel from pypi within bazel. To try this,
6+
# you'll have to `pip install grpcio` locally so it's available for
7+
# import.
8+
39
py_binary(
410
name = "greeter_client",
511
srcs = [
612
"greeter_client.py",
13+
"//examples/proto:py",
714
"//examples/helloworld/proto:py",
815
],
916
)

examples/helloworld/python/greeter_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333

3434
import grpc
3535

36-
import helloworld_pb2
36+
#import helloworld_pb2
37+
from examples.helloworld.proto import helloworld_pb2
3738

3839
def run():
3940
channel = grpc.insecure_channel('localhost:50051')

0 commit comments

Comments
 (0)