diff --git a/docs/guide/BUILD b/docs/guide/BUILD index cf700c9aa..b4bb1c331 100644 --- a/docs/guide/BUILD +++ b/docs/guide/BUILD @@ -1,5 +1,9 @@ load("//third_party/py/tensorflow_docs/google:tf_org.bzl", "tf_org_check_links", "tf_org_notebook_test") +package( + default_applicable_licenses = ["//tensorflow_text:license"], +) + licenses(["notice"]) tf_org_check_links(name = "check_links") diff --git a/docs/tutorials/BUILD b/docs/tutorials/BUILD index ce5b8244d..caf7e179f 100644 --- a/docs/tutorials/BUILD +++ b/docs/tutorials/BUILD @@ -1,5 +1,9 @@ load("//third_party/py/tensorflow_docs/google:tf_org.bzl", "tf_org_check_links", "tf_org_notebook_test") +package( + default_applicable_licenses = ["//tensorflow_text:license"], +) + licenses(["notice"]) tf_org_check_links(name = "check_links") diff --git a/tensorflow_text/core/kernels/BUILD b/tensorflow_text/core/kernels/BUILD index 8aba03626..57527e275 100644 --- a/tensorflow_text/core/kernels/BUILD +++ b/tensorflow_text/core/kernels/BUILD @@ -11,7 +11,10 @@ load("//tensorflow_text:tftext.bzl", "tf_cc_library", "tflite_cc_library") licenses(["notice"]) # Visibility rules -package(default_visibility = ["//visibility:public"]) +package( + default_applicable_licenses = ["//tensorflow_text:license"], + default_visibility = ["//visibility:public"], +) exports_files(["LICENSE"]) diff --git a/tensorflow_text/core/kernels/sentencepiece/BUILD b/tensorflow_text/core/kernels/sentencepiece/BUILD index 20e5c8878..833984106 100644 --- a/tensorflow_text/core/kernels/sentencepiece/BUILD +++ b/tensorflow_text/core/kernels/sentencepiece/BUILD @@ -9,7 +9,10 @@ load("//tensorflow_text:tftext.bzl", "tf_cc_library", "tflite_cc_library") licenses(["notice"]) # Visibility rules -package(default_visibility = ["//visibility:public"]) +package( + default_applicable_licenses = ["//tensorflow_text:license"], + default_visibility = ["//visibility:public"], +) filegroup( name = "testdata", diff --git a/tensorflow_text/core/ops/BUILD b/tensorflow_text/core/ops/BUILD index 79b489fce..c6305a357 100644 --- a/tensorflow_text/core/ops/BUILD +++ b/tensorflow_text/core/ops/BUILD @@ -4,7 +4,10 @@ load("@rules_cc//cc:cc_test.bzl", "cc_test") licenses(["notice"]) -package(default_visibility = ["//visibility:private"]) +package( + default_applicable_licenses = ["//tensorflow_text:license"], + default_visibility = ["//visibility:private"], +) exports_files(glob(["*.cc"])) diff --git a/tensorflow_text/core/pybinds/BUILD b/tensorflow_text/core/pybinds/BUILD index a8f5057d2..94f6ff07b 100644 --- a/tensorflow_text/core/pybinds/BUILD +++ b/tensorflow_text/core/pybinds/BUILD @@ -5,11 +5,14 @@ load("//tensorflow_text:tftext.bzl", "if_pywrap", "pybind_extension", "pywrap_bi licenses(["notice"]) -package(default_visibility = [ - "//nlp/sage/nlu/features/python:__pkg__", - "//nlp/semantic_parsing/learning/neural/portable/tools/release:__pkg__", - "//tensorflow_text:__subpackages__", -]) +package( + default_applicable_licenses = ["//tensorflow_text:license"], + default_visibility = [ + "//nlp/sage/nlu/features/python:__pkg__", + "//nlp/semantic_parsing/learning/neural/portable/tools/release:__pkg__", + "//tensorflow_text:__subpackages__", + ], +) pybind_extension( name = "tflite_registrar", diff --git a/tensorflow_text/tools/wordpiece_vocab/BUILD b/tensorflow_text/tools/wordpiece_vocab/BUILD index ea04734e4..e356b8145 100644 --- a/tensorflow_text/tools/wordpiece_vocab/BUILD +++ b/tensorflow_text/tools/wordpiece_vocab/BUILD @@ -5,6 +5,7 @@ load("//tensorflow_text:tftext.bzl", "if_pywrap") licenses(["notice"]) package( + default_applicable_licenses = ["//tensorflow_text:license"], default_visibility = [ "//tensorflow_text:__subpackages__", ], diff --git a/third_party/bazel/BUILD b/third_party/bazel/BUILD index e69de29bb..9a1ad0084 100644 --- a/third_party/bazel/BUILD +++ b/third_party/bazel/BUILD @@ -0,0 +1,3 @@ +package( + default_applicable_licenses = ["//tensorflow_text:license"], +) diff --git a/third_party/darts_clone/BUILD b/third_party/darts_clone/BUILD index 82bab3ffd..c1cf21c3c 100644 --- a/third_party/darts_clone/BUILD +++ b/third_party/darts_clone/BUILD @@ -1 +1,5 @@ +package( + default_applicable_licenses = ["//tensorflow_text:license"], +) + # This empty BUILD file is required to make Bazel treat this directory as a package. diff --git a/third_party/icu/BUILD b/third_party/icu/BUILD index 82bab3ffd..c1cf21c3c 100644 --- a/third_party/icu/BUILD +++ b/third_party/icu/BUILD @@ -1 +1,5 @@ +package( + default_applicable_licenses = ["//tensorflow_text:license"], +) + # This empty BUILD file is required to make Bazel treat this directory as a package. diff --git a/third_party/pybind11/BUILD b/third_party/pybind11/BUILD index c3f090ff1..b16d8cc0b 100644 --- a/third_party/pybind11/BUILD +++ b/third_party/pybind11/BUILD @@ -1,2 +1,6 @@ +package( + default_applicable_licenses = ["//tensorflow_text:license"], +) + # This empty BUILD file is required to make Bazel treat this directory as a package. # Bazel cannot build with this package without it. diff --git a/third_party/sentencepiece/BUILD.empty b/third_party/sentencepiece/BUILD.empty index 60a62e5ca..917582245 100644 --- a/third_party/sentencepiece/BUILD.empty +++ b/third_party/sentencepiece/BUILD.empty @@ -1 +1,5 @@ +package( + default_applicable_licenses = ["//third_party/tensorflow_text:license"], +) + # Empty build file diff --git a/third_party/tensorflow/BUILD b/third_party/tensorflow/BUILD index 2b0003e18..c9bd33a9e 100644 --- a/third_party/tensorflow/BUILD +++ b/third_party/tensorflow/BUILD @@ -1 +1,5 @@ +package( + default_applicable_licenses = ["//tensorflow_text:license"], +) + # Needed for Bazel to treat this directory as a package