8000 Fix errors with incompatible_disallow_empty_glob · bazel-contrib/rules_python@7711c7b · GitHub
[go: up one dir, main page]

Skip to content

Commit 7711c7b

Browse files
committed
Fix errors with incompatible_disallow_empty_glob
Allow py_library sources to be empty. If --incompatible_disallow_empty_glob is set then generated py_library targets will fail if there are no .py files. Examples are pymssql==2.1.4 and cx-Oracle==7.2.3. Set `allow_empty = True` for glob(). Bazel issue for incompatible_disallow_empty_glob: bazelbuild/bazel#8195
1 parent 29f96bd commit 7711c7b

File tree

3 files changed

+1
-1
lines changed

3 files changed

+1
-1
lines changed

packaging/whl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def main():
148148
149149
py_library(
150150
name = "pkg",
151-
srcs = glob(["**/*.py"]),
151+
srcs = glob(["**/*.py"], allow_empty = True),
152152
data = glob(["**/*"], exclude=["**/*.py", "**/* *", "BUILD", "WORKSPACE"]),
153153
# This makes this directory a top-level in the python import
154154
# search path for anything that depends on this.

tools/piptool.par

1.73 KB
Binary file not shown.

tools/whltool.par

1.75 KB
Binary file not shown.

0 commit comments

Comments
 (0)
0