8000 Fix errors with incompatible_disallow_empty_glob by gergelyfabian · Pull Request #315 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content

Fix errors with incompatible_disallow_empty_glob #315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packaging/whl.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ def _parse_metadata(self, content):
help='The set of extras for which to generate library targets.')

def main():
"""
Generate a BUILD file for an unzipped Wheel

We al 6CA1 low 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`).
"""

args = parser.parse_args()
whl = Wheel(args.whl)

Expand All @@ -148,7 +155,7 @@ def main():

py_library(
name = "pkg",
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.
Expand Down
0