fix: delete BUILD et al files from pypi sourced dependencies#3029
Merged
rickeylev merged 9 commits intobazel-contrib:mainfrom Jun 27, 2025
Merged
fix: delete BUILD et al files from pypi sourced dependencies#3029rickeylev merged 9 commits intobazel-contrib:mainfrom
rickeylev merged 9 commits intobazel-contrib:mainfrom
Conversation
fce691e to
23cb11d
Compare
Collaborator
Author
|
Ideas for testing this? Aside from checking in a pre-built whl (I'm very much against any checked in artifacts after what happened to xz) Ah -- a repository rule to transform a file structure into a zip, to then pass onto whl_library? We can then define an entirely arbitrary layout of files verbatim and have it automatically turned into a wheel for testing. |
3edab06 to
34a3090
Compare
Collaborator
Author
|
I added a helper to create a whl from a directory tree. This is really nice for testing whl_library! We can now integration test arbitrary wheel file structures and contents without having to download anything. |
aignas
approved these changes
Jun 26, 2025
Collaborator
aignas
left a comment
There was a problem hiding this comment.
Nice!
Please remember to add a line in the CHANGELOG.
…into fix.pypi.rm.build.files
Collaborator
Author
|
Changelog updated. Merging. |
amartani
pushed a commit
to benchling/rules_python
that referenced
this pull request
Jul 8, 2025
…ontrib#3029) Sometimes wheels mistakenly contain BUILD files (or other special Bazel files). When extracted, these interfere with how we expected the repo to look. In particular, globs no longer match correctly because BUILD files create a Bazel package boundary. To fix, delete these files. They aren't generally usable, since they can't know what version of Bazel, rule_python, or similar, is consuming them. Fixes bazel-contrib#2782
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sometimes wheels mistakenly contain BUILD files (or other special Bazel files).
When extracted, these interfere with how we expected the repo to look. In particular,
globs no longer match correctly because BUILD files create a Bazel package boundary.
To fix, delete these files. They aren't generally usable, since they can't know what
version of Bazel, rule_python, or similar, is consuming them.
Fixes #2782