• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 The gRPC Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14load("@rules_python//python:defs.bzl", "py_library")
15load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
16
17package(default_visibility = ["//visibility:public"])
18
19py_proto_library(
20    name = "reflection_py_pb2",
21    imports = ["../../"],
22    deps = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_only"],
23)
24
25py_grpc_library(
26    name = "reflection_py_pb2_grpc",
27    srcs = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_only"],
28    strip_prefixes = ["src.python.grpcio_reflection."],
29    deps = ["reflection_py_pb2"],
30)
31
32py_library(
33    name = "grpc_reflection",
34    srcs = glob(["*.py"]),
35    imports = ["../../"],
36    deps = [
37        ":reflection_py_pb2",
38        ":reflection_py_pb2_grpc",
39        "//src/python/grpcio/grpc:grpcio",
40        "@com_google_protobuf//:protobuf_python",
41    ],
42)
43