blob: e40740b17b70547ef31b43021eb6607b7bee66e2 [file]
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("@rules_python//python:defs.bzl", "py_library")
load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
package(default_visibility = ["//visibility:public"])
proto_library(
name = "reflection_proto_descriptor",
srcs = ["reflection.proto"],
)
py_proto_library(
name = "reflection_py_pb2",
deps = [":reflection_proto_descriptor"],
)
py_grpc_library(
name = "reflection_py_pb2_grpc",
srcs = [":reflection_proto_descriptor"],
strip_prefixes = ["src.python.grpcio_reflection."],
deps = ["reflection_py_pb2"],
)
py_library(
name = "grpc_reflection",
srcs = glob(["*.py"]),
imports = ["../../"],
deps = [
":reflection_py_pb2",
":reflection_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
"@com_google_protobuf//:protobuf_python",
],
)