Skip to content

Commit 30d8477

Browse files
Fix errors with incompatible_disallow_empty_glob (#40)
1 parent ed2f644 commit 30d8477

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

extract_wheels/lib/bazel.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ def generate_build_file_contents(name: str, dependencies: List[str]) -> str:
1515
1616
Returns:
1717
A complete BUILD file as a string
18+
19+
We allow for empty Python sources as for Wheels containing only compiled C code
20+
there may be no Python sources whatsoever (e.g. packages written in Cython: like `pymssql`).
1821
"""
1922

2023
return textwrap.dedent(
@@ -25,7 +28,7 @@ def generate_build_file_contents(name: str, dependencies: List[str]) -> str:
2528
2629
py_library(
2730
name = "{name}",
28-
srcs = glob(["**/*.py"]),
31+
srcs = glob(["**/*.py"], allow_empty = True),
2932
data = glob(["**/*"], exclude=["**/*.py", "**/* *", "BUILD", "WORKSPACE"]),
3033
# This makes this directory a top-level in the python import
3134
# search path for anything that depends on this.

0 commit comments

Comments
 (0)