Fix errors with incompatible_disallow_empty_glob (#40)
diff --git a/extract_wheels/lib/bazel.py b/extract_wheels/lib/bazel.py
index 2d4c61e..1b68d91 100644
--- a/extract_wheels/lib/bazel.py
+++ b/extract_wheels/lib/bazel.py
@@ -15,6 +15,9 @@
Returns:
A complete BUILD file as a string
+
+ We allow for empty Python sources as for Wheels containing only compiled C code
+ there may be no Python sources whatsoever (e.g. packages written in Cython: like `pymssql`).
"""
return textwrap.dedent(
@@ -25,7 +28,7 @@
py_library(
name = "{name}",
- srcs = glob(["**/*.py"]),
+ srcs = glob(["**/*.py"], allow_empty = True),
data = glob(["**/*"], exclude=["**/*.py", "**/* *", "BUILD", "WORKSPACE"]),
# This makes this directory a top-level in the python import
# search path for anything that depends on this.