Skip to content

Commit 8b820e1

Browse files
committed
exclude more special bazel files
1 parent 1f03a3f commit 8b820e1

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

python/private/pypi/whl_library_targets.bzl

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ load(
3434
load(":namespace_pkgs.bzl", "create_inits")
3535
load(":pep508_deps.bzl", "deps")
3636

37+
# Files that are special to the Bazel processing of things.
38+
_BAZEL_REPO_FILE_GLOBS = [
39+
"BUILD",
40+
"BUILD.bazel",
41+
"REPO.bazel",
42+
"WORKSPACE",
43+
"WORKSPACE",
44+
"WORKSPACE.bazel",
45+
]
46+
3747
def whl_library_targets_from_requires(
3848
*,
3949
name,
@@ -172,10 +182,10 @@ def whl_library_targets(
172182
filegroups = {
173183
EXTRACTED_WHEEL_FILES: dict(
174184
include = ["**"],
175-
exclude = [
176-
"BUILD.bazel",
177-
name,
178-
] + [sdist_filename] if sdist_filename else [],
185+
exclude = (
186+
_BAZEL_REPO_FILE_GLOBS +
187+
[sdist_filename] if sdist_filename else []
188+
),
179189
),
180190
DIST_INFO_LABEL: dict(
181191
include = ["site-packages/*.dist-info/**"],

0 commit comments

Comments
 (0)