|
|
|
@ -15,7 +15,7 @@ |
|
|
|
|
# limitations under the License. |
|
|
|
|
|
|
|
|
|
load("@grpc_python_dependencies//:requirements.bzl", "requirement") |
|
|
|
|
load("//bazel:python_rules.bzl", "py_proto_library") |
|
|
|
|
load("//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library") |
|
|
|
|
|
|
|
|
|
package(default_testonly = 1) |
|
|
|
|
|
|
|
|
@ -25,9 +25,14 @@ proto_library( |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
py_proto_library( |
|
|
|
|
name = "hash_name_proto_pb2", |
|
|
|
|
deps = [":hash_name_proto"], |
|
|
|
|
well_known_protos = False, |
|
|
|
|
name = "hash_name_py_pb2", |
|
|
|
|
srcs = [":hash_name_proto"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
py_grpc_library( |
|
|
|
|
name = "hash_name_py_pb2_grpc", |
|
|
|
|
srcs = [":hash_name_proto"], |
|
|
|
|
deps = [":hash_name_py_pb2"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
py_binary( |
|
|
|
@ -35,8 +40,9 @@ py_binary( |
|
|
|
|
srcs = ["client.py"], |
|
|
|
|
deps = [ |
|
|
|
|
"//src/python/grpcio/grpc:grpcio", |
|
|
|
|
":hash_name_proto_pb2", |
|
|
|
|
requirement("six"), |
|
|
|
|
":hash_name_py_pb2", |
|
|
|
|
":hash_name_py_pb2_grpc", |
|
|
|
|
"//external:six" |
|
|
|
|
], |
|
|
|
|
srcs_version = "PY2AND3", |
|
|
|
|
) |
|
|
|
@ -46,7 +52,7 @@ py_library( |
|
|
|
|
srcs = ["search.py"], |
|
|
|
|
srcs_version = "PY2AND3", |
|
|
|
|
deps = [ |
|
|
|
|
":hash_name_proto_pb2", |
|
|
|
|
":hash_name_py_pb2", |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -55,10 +61,10 @@ py_binary( |
|
|
|
|
srcs = ["server.py"], |
|
|
|
|
deps = [ |
|
|
|
|
"//src/python/grpcio/grpc:grpcio", |
|
|
|
|
":hash_name_proto_pb2", |
|
|
|
|
":hash_name_py_pb2", |
|
|
|
|
":search", |
|
|
|
|
] + select({ |
|
|
|
|
"//conditions:default": [requirement("futures")], |
|
|
|
|
"//conditions:default": ["@futures//:futures"], |
|
|
|
|
"//:python3": [], |
|
|
|
|
}), |
|
|
|
|
srcs_version = "PY2AND3", |
|
|
|
|