aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_reflection
diff options
context:
space:
mode:
authorGravatar Naresh <ghostwriternr@gmail.com>2018-10-11 09:14:58 +0000
committerGravatar Nathaniel Manista <nathaniel@google.com>2018-11-01 12:01:02 +0000
commite4382abc9ca48493a5b45a02bc2172cca8739b2c (patch)
tree1deed32c86173ef95e7586cbc28e353e68f3c4d7 /src/python/grpcio_reflection
parentd35a7c42dc908d240925151eb5236dcd77a381a4 (diff)
Bazel rules for Python grpcio_reflection
Diffstat (limited to 'src/python/grpcio_reflection')
-rw-r--r--src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel b/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel
new file mode 100644
index 0000000000..3a2ba26371
--- /dev/null
+++ b/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel
@@ -0,0 +1,34 @@
+load("@grpc_python_dependencies//:requirements.bzl", "requirement")
+load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library")
+
+package(default_visibility = ["//visibility:public"])
+
+genrule(
+ name = "mv_reflection_proto",
+ srcs = [
+ "//src/proto/grpc/reflection/v1alpha:reflection_proto_file",
+ ],
+ outs = ["reflection.proto",],
+ cmd = "cp $< $@",
+)
+
+py_proto_library(
+ name = "py_reflection_proto",
+ protos = [":mv_reflection_proto",],
+ with_grpc = True,
+ deps = [
+ requirement('protobuf'),
+ ],
+)
+
+py_library(
+ name = "grpc_reflection",
+ srcs = ["reflection.py",],
+ deps = [
+ ":py_reflection_proto",
+ "//src/python/grpcio/grpc:grpcio",
+ requirement('protobuf'),
+ ],
+ imports=["../../",],
+)
+