Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2b1d6be

Browse filesBrowse files
authored
Ignore __pycache__ contents and *.pyc files in external dependencies (bazel-contrib#570)
1 parent 288df22 commit 2b1d6be
Copy full SHA for 2b1d6be

File tree

1 file changed

+3
-1
lines changed
Filter options
  • python/pip_install/extract_wheels/lib

1 file changed

+3
-1
lines changed

‎python/pip_install/extract_wheels/lib/bazel.py

Copy file name to clipboardExpand all lines: python/pip_install/extract_wheels/lib/bazel.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ def generate_build_file_contents(
103103

104104
data_exclude = [
105105
"*.whl",
106+
"**/__pycache__/**",
106107
"**/*.py",
108+
"**/*.pyc",
107109
f"{WHEEL_ENTRY_POINT_PREFIX}*.py",
108110
"**/* *",
109111
"BUILD.bazel",
@@ -134,7 +136,7 @@ def generate_build_file_contents(
134136
135137
py_library(
136138
name = "{name}",
137-
srcs = glob(["**/*.py"], exclude=["{entry_point_prefix}*.py"], allow_empty = True),
139+
srcs = glob(["**/*.py"], exclude=["{entry_point_prefix}*.py", "**/__pycache__/**"], allow_empty = True),
138140
data = glob(["**/*"], exclude={data_exclude}),
139141
# This makes this directory a top-level in the python import
140142
# search path for anything that depends on this.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.