Skip to content

Delete BUILD files from extracted pypi dependencies #2782

@rickeylev

Description

@rickeylev

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: pippip/pypi integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions