From 7db7b2c11789f26a06bc8513826997f437bce308 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 18 Jun 2024 13:10:52 -0700 Subject: [PATCH] chore: use `**` globs instead of explcit BUILD.bazel reference in distribution filegroups 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. --- python/config_settings/BUILD.bazel | 3 +-- python/config_settings/private/BUILD.bazel | 4 +--- python/entry_points/BUILD.bazel | 6 +----- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/python/config_settings/BUILD.bazel b/python/config_settings/BUILD.bazel index 73e6ef941b..f4411744ca 100644 --- a/python/config_settings/BUILD.bazel +++ b/python/config_settings/BUILD.bazel @@ -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__"], diff --git a/python/config_settings/private/BUILD.bazel b/python/config_settings/private/BUILD.bazel index aa68c6508c..cb42e4999a 100644 --- a/python/config_settings/private/BUILD.bazel +++ b/python/config_settings/private/BUILD.bazel @@ -1,7 +1,5 @@ filegroup( name = "distribution", - srcs = glob(["*.bzl"]) + [ - "BUILD.bazel", - ], + srcs = glob(["**"]), visibility = ["//python/config_settings:__pkg__"], ) diff --git a/python/entry_points/BUILD.bazel b/python/entry_points/BUILD.bazel index d45fb18825..46dbd9298b 100644 --- a/python/entry_points/BUILD.bazel +++ b/python/entry_points/BUILD.bazel @@ -32,10 +32,6 @@ bzl_library( filegroup( name = "distribution", - srcs = glob([ - "*.bzl", - ]) + [ - "BUILD.bazel", - ], + srcs = glob(["**"]), visibility = ["//python:__subpackages__"], )