Skip to content

Delete BUILD files from extracted pypi dependencies #2782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rickeylev opened this issue Apr 16, 2025 · 2 comments
Open

Delete BUILD files from extracted pypi dependencies #2782

rickeylev opened this issue Apr 16, 2025 · 2 comments
Labels
type: pip pip/pypi integration

Comments

@rickeylev
Copy link
Collaborator

rickeylev commented Apr 16, 2025

An issue I've seen happen at least 3 times is a pypi dependency contains a BUILD file, which then breaks the generated Bazel package.

Why this occurs is a bit unclear because the Bazel docs say that BUILD.bazel should take precedence over BUILD

In any case, after extracting the wheel, we should just delete any BUILD or BUILD.bazel files it created. Such files can only cause issues -- there's no way for them to know what version of bazel or rules_python is being used, so they can't reliably define a bazel package. If one exists in a sub-directory, then it will break glob() (it doesn't cross bazel package boundaries).

Related:

@rickeylev
Copy link
Collaborator Author

cc @aignas

@aignas
Copy link
Collaborator

aignas commented Apr 16, 2025

I was thinking about this as well, thanks for creating the issue.

@aignas aignas added the type: pip pip/pypi integration label Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: pip pip/pypi integration
Projects
None yet
Development

No branches or pull requests

2 participants