From df0978ceb07c84c2708cfba71acc54100eccbf2d Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Fri, 10 Jul 2020 14:07:22 -0700 Subject: [PATCH] Clean up build file --- src/python/grpcio/grpc/BUILD.bazel | 6 +++++ .../python/grpcio_tools/grpc_tools/BUILD | 23 ++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/python/grpcio/grpc/BUILD.bazel b/src/python/grpcio/grpc/BUILD.bazel index 470b11e7fd7..5abbf4adf08 100644 --- a/src/python/grpcio/grpc/BUILD.bazel +++ b/src/python/grpcio/grpc/BUILD.bazel @@ -66,6 +66,11 @@ py_library( srcs = ["_simple_stubs.py"], ) +py_library( + name = "_runtime_protos", + srcs = ["_runtime_protos.py"], +) + py_library( name = "grpcio", srcs = ["__init__.py"], @@ -82,6 +87,7 @@ py_library( ":server", ":compression", ":_simple_stubs", + ":_runtime_protos", "//src/python/grpcio/grpc/_cython:cygrpc", "//src/python/grpcio/grpc/experimental", "//src/python/grpcio/grpc/framework", diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/BUILD b/tools/distrib/python/grpcio_tools/grpc_tools/BUILD index 8c6a1059fbc..4e31cc29abc 100644 --- a/tools/distrib/python/grpcio_tools/grpc_tools/BUILD +++ b/tools/distrib/python/grpcio_tools/grpc_tools/BUILD @@ -1,21 +1,29 @@ -# TODO(rbellevi): Fix this wide-open visibility. -package(default_visibility = ["//visibility:public"]) +# Copyright 2020 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. + +package(default_visibility = ["//src/python:__subpackages__"]) load("//bazel:cython_library.bzl", "pyx_library") -# TODO: Move this build file up a directory to ensure that this -# points to '.', not a directory above the package root. NON_BAZEL_ROOT = "../" -# TODO: Move BUILD file up a directory cc_library( - # TODO: Better name? name = "protoc_lib", srcs = ["main.cc"], hdrs = ["main.h"], deps = [ "@com_google_protobuf//:protoc_lib", - # I really wish there were a disaggregated target to use here. "//src/compiler:grpc_plugin_support", ], includes = [NON_BAZEL_ROOT], @@ -36,7 +44,6 @@ py_library( "@com_google_protobuf//:protobuf_python", "//src/python/grpcio/grpc:grpcio", ], - # TODO: Think about whether we should include well-known protos. srcs_version = "PY2AND3", imports = [NON_BAZEL_ROOT], )