Skip to content

Commit

Permalink
pip_package: exclude grpc licenses when building system library
Browse files Browse the repository at this point in the history
The grpc license files are deeper in the heirarchy so are hard to nop
out in the system version of the BUILD file.

Signed-off-by: Jason Zaman <jason@perfinion.com>
  • Loading branch information
perfinion committed Jul 4, 2018
1 parent 2e20414 commit 0c06787
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions tensorflow/tools/pip_package/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ load(
load("//third_party/mkl:build_defs.bzl", "if_mkl")
load("//tensorflow:tensorflow.bzl", "if_cuda")
load("@local_config_tensorrt//:build_defs.bzl", "if_tensorrt")
load("@local_config_syslibs//:build_defs.bzl", "if_not_system_lib")
load("//tensorflow/core:platform/default/build_config_root.bzl", "tf_additional_license_deps")

# This returns a list of headers of all public header libraries (e.g.,
Expand Down Expand Up @@ -144,7 +145,6 @@ filegroup(
"@gast_archive//:PKG-INFO",
"@gemmlowp//:LICENSE",
"@gif_archive//:COPYING",
"@grpc//:LICENSE",
"@highwayhash//:LICENSE",
"@jemalloc//:COPYING",
"@jpeg//:LICENSE.md",
Expand All @@ -153,8 +153,6 @@ filegroup(
"@lmdb//:LICENSE",
"@local_config_nccl//:LICENSE",
"@local_config_sycl//sycl:LICENSE.text",
"@grpc//third_party/nanopb:LICENSE.txt",
"@grpc//third_party/address_sorting:LICENSE",
"@nasm//:LICENSE",
"@nsync//:LICENSE",
"@pcre//:LICENCE",
Expand All @@ -168,6 +166,10 @@ filegroup(
"@org_python_pypi_backports_weakref//:LICENSE",
] + if_mkl([
"//third_party/mkl:LICENSE",
]) + if_not_system_lib("grpc", [
"@grpc//:LICENSE",
"@grpc//third_party/nanopb:LICENSE.txt",
"@grpc//third_party/address_sorting:LICENSE",
]) + tf_additional_license_deps(),
)

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/pip_package/build_pip_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function cp_external() {

pushd .
cd "$src_dir"
for f in `find . ! -type d ! -name '*.py' ! -name '*local_config_cuda*' ! -name '*local_config_tensorrt*' ! -name '*org_tensorflow*'`; do
for f in `find . ! -type d ! -name '*.py' ! -name '*local_config_cuda*' ! -name '*local_config_tensorrt*' ! -name '*local_config_syslibs*' ! -name '*org_tensorflow*'`; do
mkdir -p "${dest_dir}/$(dirname ${f})"
cp "${f}" "${dest_dir}/$(dirname ${f})/"
done
Expand Down

0 comments on commit 0c06787

Please sign in to comment.