aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel
blob: 3a2ba26371507227e2b3c49e096029c0d4af292c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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=["../../",],
)