Skip to content

Commit

Permalink
chore: use ** globs instead of explcit BUILD.bazel reference in dis…
Browse files Browse the repository at this point in the history
…tribution filegroups (#1991)

This is to make Google patching and imports of rules_python easier.
Within Google, `BUILD` is the file name instead of `BUILD.bazel`. It's
also easy for the distribution filegroups to accidentally miss files, so
to prevent that, just glob everything.
  • Loading branch information
rickeylev authored Jun 18, 2024
1 parent b16f4f9 commit 95b150d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
3 changes: 1 addition & 2 deletions python/config_settings/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ load(":config_settings.bzl", "construct_config_settings")

filegroup(
name = "distribution",
srcs = glob(["*.bzl"]) + [
"BUILD.bazel",
srcs = glob(["**"]) + [
"//python/config_settings/private:distribution",
],
visibility = ["//python:__pkg__"],
Expand Down
4 changes: 1 addition & 3 deletions python/config_settings/private/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
filegroup(
name = "distribution",
srcs = glob(["*.bzl"]) + [
"BUILD.bazel",
],
srcs = glob(["**"]),
visibility = ["//python/config_settings:__pkg__"],
)
6 changes: 1 addition & 5 deletions python/entry_points/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ bzl_library(

filegroup(
name = "distribution",
srcs = glob([
"*.bzl",
]) + [
"BUILD.bazel",
],
srcs = glob(["**"]),
visibility = ["//python:__subpackages__"],
)

0 comments on commit 95b150d

Please sign in to comment.