diff --git a/third_party/def_parser/BUILD b/third_party/def_parser/BUILD index 0f281e4da38411..10d90b5f2e31aa 100644 --- a/third_party/def_parser/BUILD +++ b/third_party/def_parser/BUILD @@ -1,3 +1,5 @@ +load("@io_bazel//tools/python:private/defs.bzl", "py_test") + licenses(["notice"]) # 3-clause BSD package( diff --git a/third_party/protobuf/3.6.1/BUILD b/third_party/protobuf/3.6.1/BUILD index a24d0c9699024f..ad39057cf569a2 100644 --- a/third_party/protobuf/3.6.1/BUILD +++ b/third_party/protobuf/3.6.1/BUILD @@ -21,6 +21,7 @@ config_setting( load(":protobuf.bzl", "py_proto_library") load(":compiler_config_setting.bzl", "create_compiler_config_setting") +load("@io_bazel//tools/python:private/defs.bzl", "py_library") filegroup( name = "srcs", diff --git a/third_party/protobuf/3.6.1/protobuf.bzl b/third_party/protobuf/3.6.1/protobuf.bzl index 50f162deeba6a6..db2c35b44da0c8 100644 --- a/third_party/protobuf/3.6.1/protobuf.bzl +++ b/third_party/protobuf/3.6.1/protobuf.bzl @@ -1,3 +1,5 @@ +load("@io_bazel//tools/python:private/defs.bzl", "py_library", "py_test") + def _GetPath(ctx, path): if ctx.label.workspace_root: return ctx.label.workspace_root + "/" + path @@ -383,7 +385,7 @@ def py_proto_library( if default_runtime and not default_runtime in py_libs + deps: py_libs = py_libs + [default_runtime] - native.py_library( + py_library( name = name, srcs = outs + py_extra_srcs, deps = py_libs + deps, @@ -406,7 +408,7 @@ def internal_protobuf_py_tests( """ for m in modules: s = "python/google/protobuf/internal/%s.py" % m - native.py_test( + py_test( name = "py_%s" % m, srcs = [s], main = s, diff --git a/third_party/protobuf/3.6.1/six.BUILD b/third_party/protobuf/3.6.1/six.BUILD index fb0b3604cdf443..0b70fe11e13427 100644 --- a/third_party/protobuf/3.6.1/six.BUILD +++ b/third_party/protobuf/3.6.1/six.BUILD @@ -1,3 +1,5 @@ +load("@io_bazel//tools/python:private/defs.bzl", "py_library") + genrule( name = "copy_six", srcs = ["six-1.10.0/six.py"], diff --git a/third_party/py/abseil/BUILD b/third_party/py/abseil/BUILD index 5bf0a22e4cdd19..0cbaca2da768ca 100644 --- a/third_party/py/abseil/BUILD +++ b/third_party/py/abseil/BUILD @@ -1,3 +1,5 @@ +load("@io_bazel//tools/python:private/defs.bzl", "py_library") + licenses(["notice"]) filegroup( diff --git a/third_party/py/concurrent/BUILD b/third_party/py/concurrent/BUILD index ccc3faa03d3594..b9d1fb6d0b171b 100644 --- a/third_party/py/concurrent/BUILD +++ b/third_party/py/concurrent/BUILD @@ -1,3 +1,5 @@ +load("@io_bazel//tools/python:private/defs.bzl", "py_library") + licenses(["notice"]) filegroup( diff --git a/third_party/py/gflags/BUILD b/third_party/py/gflags/BUILD index 35f06748e7286d..8965640bf8b94e 100644 --- a/third_party/py/gflags/BUILD +++ b/third_party/py/gflags/BUILD @@ -1,3 +1,5 @@ +load("@io_bazel//tools/python:private/defs.bzl", "py_library") + licenses(["notice"]) filegroup( diff --git a/third_party/py/mock/BUILD b/third_party/py/mock/BUILD index 2d4961de9e696d..6d63b2059ea22a 100644 --- a/third_party/py/mock/BUILD +++ b/third_party/py/mock/BUILD @@ -1,3 +1,5 @@ +load("@io_bazel//tools/python:private/defs.bzl", "py_library") + licenses(["notice"]) filegroup( diff --git a/third_party/py/six/BUILD b/third_party/py/six/BUILD index fa060cb6aed82c..6d99be0e3a54d0 100644 --- a/third_party/py/six/BUILD +++ b/third_party/py/six/BUILD @@ -1,3 +1,5 @@ +load("@io_bazel//tools/python:private/defs.bzl", "py_library") + licenses(["notice"]) filegroup(