Repository navigation
Conversation
`py_library` targets that have a `.dist-info/METADATA` file in their `data`, such as the ones `pip.parse` creates from wheels, record their normalized package name in the new `PyInfo.packages` depset, which is propagated transitively. Previously the name was only available via `venv_symlinks` when `--venvs_site_packages=yes` was set. This allows rules to check whether a target depends on a given package, e.g. so that a `py_test` can tell whether it already depends on `coverage`.
Collaborator
Author
|
This PR was drafted by an AI coding agent (Claude Code) working for @aignas, as a prerequisite for the reworked #4433. Review comments will be handled by @aignas, possibly with the help of the agent; any agent-written replies will be marked as such. Agent-generated comment, posted on behalf of the user. |
aignas
added a commit
to aignas/rules_python
that referenced
this pull request
Nov 15, 2026
`PyInfo.packages` is no longer used by the `--coverage` flag, and it is proposed separately in bazel-contrib#4506, so remove it from this change.
Collaborator
Author
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.
py_librarytargets that have a.dist-info/METADATAfile in theirdata,such as the ones
pip.parsecreates from wheels, now record their normalizedpackage name in the new
PyInfo.packagesdepset, which is propagatedtransitively.
Previously, the package name was only available in
PyInfo.venv_symlinks,and only when
--venvs_site_packages=yeswas set, so rules could not tellwhether a target depends on a given PyPI package. For example,
py_testneeds this to use a
coveragepackage that it already depends on forbazel coverageinstead of the toolchain coverage tool.Work towards #3902