diff --git a/distro/BUILD b/distro/BUILD index ac1f5c1301..2b5103376c 100644 --- a/distro/BUILD +++ b/distro/BUILD @@ -1,11 +1,11 @@ -package( - default_visibility = ["//visibility:private"], -) - load("@rules_pkg//:pkg.bzl", "pkg_tar") load("@rules_pkg//releasing:defs.bzl", "print_rel_notes") load("@rules_python//:version.bzl", "version") +package( + default_visibility = ["//visibility:private"], +) + # Build the artifact to put on the github release page. pkg_tar( name = "rules_python-%s" % version, diff --git a/docs/BUILD b/docs/BUILD index 90335fcb58..b84e2505a1 100644 --- a/docs/BUILD +++ b/docs/BUILD @@ -16,13 +16,13 @@ # To regenerate documentation, run the top-level update_docs.sh script. # ############################################################################### +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@io_bazel_skydoc//stardoc:stardoc.bzl", "stardoc") + package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # Apache 2.0 -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load("@io_bazel_skydoc//stardoc:stardoc.bzl", "stardoc") - # We define these bzl_library targets here rather than in the //python package # because they're only used for doc generation. This way, we avoid requiring # our users to depend on Skylib. diff --git a/examples/boto/BUILD b/examples/boto/BUILD index 0bac9f645a..a39c883310 100644 --- a/examples/boto/BUILD +++ b/examples/boto/BUILD @@ -11,13 +11,14 @@ # 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 = ["//visibility:public"]) - -licenses(["notice"]) # Apache 2.0 load("@examples_boto//:requirements.bzl", "requirement") load("//python:defs.bzl", "py_test") +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) # Apache 2.0 + py_test( name = "boto_test", srcs = ["boto_test.py"], diff --git a/examples/extras/BUILD b/examples/extras/BUILD index babfc1b706..85c9101453 100644 --- a/examples/extras/BUILD +++ b/examples/extras/BUILD @@ -11,13 +11,14 @@ # 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 = ["//visibility:public"]) - -licenses(["notice"]) # Apache 2.0 load("@examples_extras//:requirements.bzl", "requirement") load("//python:defs.bzl", "py_test") +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) # Apache 2.0 + py_test( name = "extras_test", srcs = ["extras_test.py"], diff --git a/examples/helloworld/BUILD b/examples/helloworld/BUILD index 285bc9da7f..f7fb45672f 100644 --- a/examples/helloworld/BUILD +++ b/examples/helloworld/BUILD @@ -11,13 +11,14 @@ # 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 = ["//visibility:public"]) - -licenses(["notice"]) # Apache 2.0 load("@examples_helloworld//:requirements.bzl", "requirement") load("//python:defs.bzl", "py_library", "py_test") +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) # Apache 2.0 + py_library( name = "helloworld", srcs = ["helloworld.py"], diff --git a/examples/version/BUILD b/examples/version/BUILD index 6c6d8e439f..735b9938c6 100644 --- a/examples/version/BUILD +++ b/examples/version/BUILD @@ -11,13 +11,14 @@ # 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 = ["//visibility:public"]) - -licenses(["notice"]) # Apache 2.0 load("@examples_version//:requirements.bzl", "requirement") load("//python:defs.bzl", "py_test") +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) # Apache 2.0 + py_test( name = "version_test", srcs = ["version_test.py"], diff --git a/experimental/examples/wheel/BUILD b/experimental/examples/wheel/BUILD index 1e4dcecb6b..8916423907 100644 --- a/experimental/examples/wheel/BUILD +++ b/experimental/examples/wheel/BUILD @@ -11,13 +11,14 @@ # 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 = ["//visibility:public"]) - -licenses(["notice"]) # Apache 2.0 load("//experimental/python:wheel.bzl", "py_package", "py_wheel") load("//python:defs.bzl", "py_library", "py_test") +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) # Apache 2.0 + py_library( name = "main", srcs = ["main.py"], diff --git a/experimental/examples/wheel/lib/BUILD b/experimental/examples/wheel/lib/BUILD index 2dcc089f6c..3b59662745 100644 --- a/experimental/examples/wheel/lib/BUILD +++ b/experimental/examples/wheel/lib/BUILD @@ -11,12 +11,13 @@ # 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. + +load("//python:defs.bzl", "py_library") + package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # Apache 2.0 -load("//python:defs.bzl", "py_library") - py_library( name = "simple_module", srcs = ["simple_module.py"], diff --git a/experimental/python/wheel.bzl b/experimental/python/wheel.bzl index 7f3c6fe39f..9cd6534e78 100644 --- a/experimental/python/wheel.bzl +++ b/experimental/python/wheel.bzl @@ -69,6 +69,7 @@ belong to given set of Python packages. This rule is intended to be used as data dependency to py_wheel rule """, attrs = { + "deps": attr.label_list(), "packages": attr.string_list( mandatory = False, allow_empty = True, @@ -77,7 +78,6 @@ List of Python packages to include in the distribution. Sub-packages are automatically included. """, ), - "deps": attr.label_list(), }, ) diff --git a/packaging/BUILD b/packaging/BUILD index 5f69d37ea3..237e0ba96d 100644 --- a/packaging/BUILD +++ b/packaging/BUILD @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache 2.0 - load("@piptool_deps//:requirements.bzl", "requirement") load("@subpar//:subpar.bzl", "par_binary") load("//python:defs.bzl", "py_library", "py_test") +licenses(["notice"]) # Apache 2.0 + py_library( name = "whl", srcs = ["whl.py"],