Skip to content

feat(pypi): support target_platforms = ["*"] in pip.parse - #4455

Merged
rickeylev merged 6 commits into
bazel-contrib:mainfrom
aignas:aignas.feat.pip-target-platforms-all
Nov 15, 2026
Merged

rickeylev merged 6 commits into
bazel-contrib:mainfrom
aignas:aignas.feat.pip-target-platforms-all

Conversation

@aignas

@aignas aignas commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Allow selecting all built-in default platforms and any custom platforms
configured with pip.default by using target_platforms = ["*"] in
pip.parse, without listing them one by one.

This is useful for hubs that need to support cross-building for any of
the configured platforms, e.g. a hub that provides a tool for every
registered toolchain, such as the coverage tool.

Work towards #3902

Allow selecting all of the platforms configured with `pip.default` without
listing them one by one. This is useful for hubs that need to support
cross-building for any of the configured platforms, e.g. a hub that provides
a tool for every toolchain.
@aignas

aignas commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

This PR was drafted by an AI coding agent (Claude Code) working for @aignas as part of the plan in #3902. It stays a draft until @aignas has reviewed it. 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 automatically on behalf of the user.

…s = ["*"]

When `target_platforms = ["*"]` is used with a `uv.lock` file, add the
platform independent wheel of a package, if there is one, as a fallback for
the Python version. The platforms that are not configured with `pip.default`
can then still use the package, whilst the configured platforms keep using
the more specific wheels.
@aignas
aignas marked this pull request as ready for review November 9, 2026 12:27
@aignas
aignas requested a review from rickeylev as a code owner November 9, 2026 12:27

@rickeylev rickeylev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in concept. So this just makes it easier to register a hub for whatever the default platforms were configured as? Makes sense.

I told my clanker to auto-post code review findings

Comment thread python/private/pypi/extension.bzl Resolved
Clarify in docs and news that `target_platforms = ["*"]` selects all
built-in default platforms in addition to custom `pip.default`
platforms, and wrap `uv.lock` test fixtures within line-length limits.
@rickeylev
rickeylev enabled auto-merge November 15, 2026 00:02
@rickeylev
rickeylev added this pull request to the merge queue Nov 15, 2026
Merged via the queue into bazel-contrib:main with commit e421e42 Nov 15, 2026
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants