Skip to content
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
12 changes: 11 additions & 1 deletion python/pip_install/extract_wheels/lib/bazel.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,30 @@ def generate_build_file_contents(
there may be no Python sources whatsoever (e.g. packages written in Cython: like `pymssql`).
"""

# `dist-info` contains non-determinisitc files which can change any time
# the repository rules run. Below is a list of known patterns to these
# files. However, not all files should be ignored as certain packages
# require things like `top_level.txt`.
dist_info_ignores = [
"**/*.dist-info/METADATA",
"**/*.dist-info/RECORD",
"**/*.dist-info/WHEEL",
]

data_exclude = list(
set(
[
"*.whl",
"**/__pycache__/**",
"**/* *",
"**/*.dist-info/**",
"**/*.py",
"**/*.pyc",
"BUILD.bazel",
"WORKSPACE",
f"{WHEEL_ENTRY_POINT_PREFIX}*.py",
]
+ data_exclude
+ dist_info_ignores
)
)

Expand Down