|
|
@ -15,13 +15,20 @@ |
|
|
|
# limitations under the License. |
|
|
|
# limitations under the License. |
|
|
|
|
|
|
|
|
|
|
|
load("@grpc_python_dependencies//:requirements.bzl", "requirement") |
|
|
|
load("@grpc_python_dependencies//:requirements.bzl", "requirement") |
|
|
|
|
|
|
|
load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
py_proto_library( |
|
|
|
|
|
|
|
name = "prime_proto", |
|
|
|
|
|
|
|
protos = ["prime.proto",], |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
py_binary( |
|
|
|
py_binary( |
|
|
|
name = "client", |
|
|
|
name = "client", |
|
|
|
testonly = 1, |
|
|
|
testonly = 1, |
|
|
|
srcs = ["client.py"], |
|
|
|
srcs = ["client.py"], |
|
|
|
deps = [ |
|
|
|
deps = [ |
|
|
|
"//src/python/grpcio/grpc:grpcio" |
|
|
|
"//src/python/grpcio/grpc:grpcio", |
|
|
|
|
|
|
|
":prime_proto", |
|
|
|
], |
|
|
|
], |
|
|
|
default_python_version = "PY3", |
|
|
|
default_python_version = "PY3", |
|
|
|
) |
|
|
|
) |
|
|
@ -31,7 +38,8 @@ py_binary( |
|
|
|
testonly = 1, |
|
|
|
testonly = 1, |
|
|
|
srcs = ["server.py"], |
|
|
|
srcs = ["server.py"], |
|
|
|
deps = [ |
|
|
|
deps = [ |
|
|
|
"//src/python/grpcio/grpc:grpcio" |
|
|
|
"//src/python/grpcio/grpc:grpcio", |
|
|
|
|
|
|
|
":prime_proto" |
|
|
|
] + select({ |
|
|
|
] + select({ |
|
|
|
"//conditions:default": [requirement("futures")], |
|
|
|
"//conditions:default": [requirement("futures")], |
|
|
|
"//:python3": [], |
|
|
|
"//:python3": [], |
|
|
|