Skip to content

Commit 84a4506

Browse files
authored
Updated pip_repository data ignore patterns (#632)
1 parent ffcf0ec commit 84a4506

File tree

1 file changed

+11
-1
lines changed
  • python/pip_install/extract_wheels/lib

1 file changed

+11
-1
lines changed

python/pip_install/extract_wheels/lib/bazel.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,30 @@ def generate_build_file_contents(
139139
there may be no Python sources whatsoever (e.g. packages written in Cython: like `pymssql`).
140140
"""
141141

142+
# `dist-info` contains non-determinisitc files which can change any time
143+
# the repository rules run. Below is a list of known patterns to these
144+
# files. However, not all files should be ignored as certain packages
145+
# require things like `top_level.txt`.
146+
dist_info_ignores = [
147+
"**/*.dist-info/METADATA",
148+
"**/*.dist-info/RECORD",
149+
"**/*.dist-info/WHEEL",
150+
]
151+
142152
data_exclude = list(
143153
set(
144154
[
145155
"*.whl",
146156
"**/__pycache__/**",
147157
"**/* *",
148-
"**/*.dist-info/**",
149158
"**/*.py",
150159
"**/*.pyc",
151160
"BUILD.bazel",
152161
"WORKSPACE",
153162
f"{WHEEL_ENTRY_POINT_PREFIX}*.py",
154163
]
155164
+ data_exclude
165+
+ dist_info_ignores
156166
)
157167
)
158168

0 commit comments

Comments
 (0)