Merge pull request #38326 from perfinion:systemlibs

PiperOrigin-RevId: 305497434
Change-Id: I3f84f06a7c962d9b0e3dee3b8a9dd0e80425c42f
This commit is contained in:
TensorFlower Gardener 2020-04-08 09:56:40 -07:00
commit 809c4e4114
5 changed files with 29 additions and 1 deletions

View File

@ -562,6 +562,11 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
sha256 = "b956598d8cbe168b5ee717b5dafa56563eb5201a947856a6688bbeac9cac4e1f", sha256 = "b956598d8cbe168b5ee717b5dafa56563eb5201a947856a6688bbeac9cac4e1f",
strip_prefix = "grpc-b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd", strip_prefix = "grpc-b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd",
system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"), system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"),
system_link_files = {
"//third_party/systemlibs:BUILD": "bazel/BUILD",
"//third_party/systemlibs:grpc.BUILD": "src/compiler/BUILD",
"//third_party/systemlibs:grpc.bazel.grpc_deps.bzl": "bazel/grpc_deps.bzl",
},
urls = [ urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz", "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz",
"https://github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz", "https://github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz",

14
third_party/systemlibs/astunparse.BUILD vendored Normal file
View File

@ -0,0 +1,14 @@
# Description:
# AST round-trip manipulation for Python.
licenses(["notice"])
py_library(
name = "astunparse",
visibility = ["//visibility:public"],
)
filegroup(
name = "LICENSE",
visibility = ["//visibility:public"],
)

View File

@ -0,0 +1,6 @@
"""Load dependencies needed to compile and test the grpc library as a 3rd-party consumer."""
def grpc_deps():
"""Loads dependencies need to compile and test the grpc library."""
pass

View File

@ -93,6 +93,7 @@ def _proto_gen_impl(ctx):
args += ["--python_out=" + gen_dir] args += ["--python_out=" + gen_dir]
inputs = srcs + deps inputs = srcs + deps
tools = [ctx.executable.protoc]
if ctx.executable.plugin: if ctx.executable.plugin:
plugin = ctx.executable.plugin plugin = ctx.executable.plugin
lang = ctx.attr.plugin_language lang = ctx.attr.plugin_language
@ -106,7 +107,7 @@ def _proto_gen_impl(ctx):
outdir = ",".join(ctx.attr.plugin_options) + ":" + outdir outdir = ",".join(ctx.attr.plugin_options) + ":" + outdir
args += ["--plugin=protoc-gen-%s=%s" % (lang, plugin.path)] args += ["--plugin=protoc-gen-%s=%s" % (lang, plugin.path)]
args += ["--%s_out=%s" % (lang, outdir)] args += ["--%s_out=%s" % (lang, outdir)]
inputs += [plugin] tools.append(plugin)
if args: if args:
ctx.actions.run( ctx.actions.run(
@ -115,6 +116,7 @@ def _proto_gen_impl(ctx):
arguments = args + import_flags + [s.path for s in srcs], arguments = args + import_flags + [s.path for s in srcs],
executable = ctx.executable.protoc, executable = ctx.executable.protoc,
mnemonic = "ProtoCompile", mnemonic = "ProtoCompile",
tools = tools,
use_default_shell_env = True, use_default_shell_env = True,
) )

View File

@ -11,6 +11,7 @@ _TF_SYSTEM_LIBS = "TF_SYSTEM_LIBS"
VALID_LIBS = [ VALID_LIBS = [
"absl_py", "absl_py",
"astor_archive", "astor_archive",
"astunparse_archive",
"boringssl", "boringssl",
"com_github_googleapis_googleapis", "com_github_googleapis_googleapis",
"com_github_googlecloudplatform_google_cloud_cpp", "com_github_googlecloudplatform_google_cloud_cpp",