From f3b57e35ec127e2e19b72d27660402fbac7054ed Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 12 Mar 2019 10:15:19 -0700 Subject: [PATCH] Properly import protos --- examples/python/multiprocessing/BUILD | 1 + examples/python/multiprocessing/client.py | 4 ++-- examples/python/multiprocessing/server.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/python/multiprocessing/BUILD b/examples/python/multiprocessing/BUILD index b72edfa6d04..6de1e947d85 100644 --- a/examples/python/multiprocessing/BUILD +++ b/examples/python/multiprocessing/BUILD @@ -20,6 +20,7 @@ load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library") py_proto_library( name = "prime_proto", protos = ["prime.proto",], + deps = [requirement("protobuf")], ) py_binary( diff --git a/examples/python/multiprocessing/client.py b/examples/python/multiprocessing/client.py index c3da4ba2b99..6d3bf5d825a 100644 --- a/examples/python/multiprocessing/client.py +++ b/examples/python/multiprocessing/client.py @@ -26,8 +26,8 @@ import sys import grpc -import prime_pb2 -import prime_pb2_grpc +from examples.python.multiprocessing import prime_pb2 +from examples.python.multiprocessing import prime_pb2_grpc _PROCESS_COUNT = 8 _MAXIMUM_CANDIDATE = 10000 diff --git a/examples/python/multiprocessing/server.py b/examples/python/multiprocessing/server.py index 27a0758d224..267019731f2 100644 --- a/examples/python/multiprocessing/server.py +++ b/examples/python/multiprocessing/server.py @@ -29,8 +29,8 @@ import sys import grpc -import prime_pb2 -import prime_pb2_grpc +from examples.python.multiprocessing import prime_pb2 +from examples.python.multiprocessing import prime_pb2_grpc _LOGGER = logging.getLogger(__name__)