Clean up build file

pull/21458/head
Richard Belleville 5 years ago
parent 1b2e7fa318
commit df0978ceb0
  1. 6
      src/python/grpcio/grpc/BUILD.bazel
  2. 23
      tools/distrib/python/grpcio_tools/grpc_tools/BUILD

@ -66,6 +66,11 @@ py_library(
srcs = ["_simple_stubs.py"], srcs = ["_simple_stubs.py"],
) )
py_library(
name = "_runtime_protos",
srcs = ["_runtime_protos.py"],
)
py_library( py_library(
name = "grpcio", name = "grpcio",
srcs = ["__init__.py"], srcs = ["__init__.py"],
@ -82,6 +87,7 @@ py_library(
":server", ":server",
":compression", ":compression",
":_simple_stubs", ":_simple_stubs",
":_runtime_protos",
"//src/python/grpcio/grpc/_cython:cygrpc", "//src/python/grpcio/grpc/_cython:cygrpc",
"//src/python/grpcio/grpc/experimental", "//src/python/grpcio/grpc/experimental",
"//src/python/grpcio/grpc/framework", "//src/python/grpcio/grpc/framework",

@ -1,21 +1,29 @@
# TODO(rbellevi): Fix this wide-open visibility. # Copyright 2020 The gRPC authors.
package(default_visibility = ["//visibility:public"]) #
# 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") 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 = "../" NON_BAZEL_ROOT = "../"
# TODO: Move BUILD file up a directory
cc_library( cc_library(
# TODO: Better name?
name = "protoc_lib", name = "protoc_lib",
srcs = ["main.cc"], srcs = ["main.cc"],
hdrs = ["main.h"], hdrs = ["main.h"],
deps = [ deps = [
"@com_google_protobuf//:protoc_lib", "@com_google_protobuf//:protoc_lib",
# I really wish there were a disaggregated target to use here.
"//src/compiler:grpc_plugin_support", "//src/compiler:grpc_plugin_support",
], ],
includes = [NON_BAZEL_ROOT], includes = [NON_BAZEL_ROOT],
@ -36,7 +44,6 @@ py_library(
"@com_google_protobuf//:protobuf_python", "@com_google_protobuf//:protobuf_python",
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
], ],
# TODO: Think about whether we should include well-known protos.
srcs_version = "PY2AND3", srcs_version = "PY2AND3",
imports = [NON_BAZEL_ROOT], imports = [NON_BAZEL_ROOT],
) )

Loading…
Cancel
Save