Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions python/pip_install/extract_wheels/lib/bazel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def generate_build_file_contents(
there may be no Python sources whatsoever (e.g. packages written in Cython: like `pymssql`).
"""

data_exclude = ["*.whl", "**/*.py", "**/* *", "BUILD", "WORKSPACE"] + pip_data_exclude
data_exclude = ["*.whl", "**/*.py", "**/* *", "BUILD.bazel", "WORKSPACE"] + pip_data_exclude

return textwrap.dedent(
"""\
Expand Down Expand Up @@ -184,7 +184,7 @@ def extract_wheel(
'"//%s:%s"' % (sanitise_name(d), WHEEL_FILE_LABEL) for d in whl_deps
]

with open(os.path.join(directory, "BUILD"), "w") as build_file:
with open(os.path.join(directory, "BUILD.bazel"), "w") as build_file:
contents = generate_build_file_contents(
sanitise_name(whl.name), sanitised_dependencies, sanitised_wheel_file_dependencies, pip_data_exclude
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_generated_build_file_has_filegroup_target(self) -> None:
)[2:] # Take off the leading // from the returned label.
# Assert that the raw wheel ends up in the package.
self.assertIn(wheel_name, os.listdir(generated_bazel_dir))
with open("{}/BUILD".format(generated_bazel_dir)) as build_file:
with open("{}/BUILD.bazel".format(generated_bazel_dir)) as build_file:
build_file_content = build_file.read()
self.assertIn('filegroup', build_file_content)

Expand Down