Repository navigation
feat(pypi): define default pip platforms for all toolchain platforms - #4456
Merged
rickeylev merged 3 commits intoNov 13, 2026
Merged
Conversation
The default `pip.default` platforms only covered the `x86_64` and `aarch64` Linux, macOS and Windows platforms, so the toolchains for the other platforms could not use the wheels from a pip hub. Add the default platforms for all of the platforms that the hermetic Python toolchains support and a test that ensures that each toolchain platform variant has a matching pip platform. The glibc Linux platforms now also match on `--py_linux_libc`, so that they do not overlap with the new musl platform, which uses the `musllinux` wheels.
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. |
rickeylev
approved these changes
Nov 13, 2026
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.
The default
pip.defaultplatforms only covered thex86_64andaarch64Linux, macOS and Windows platforms, so the toolchains for the other platforms
could not use the wheels from a pip hub. Add the default platforms for all of
the platforms that the hermetic Python toolchains support:
linux_armv7,linux_i386,linux_ppc,linux_riscv64,linux_s390xusing the
manylinuxwheels.linux_x86_64_muslusing themusllinuxwheels.osx_arm64eandwindows_x86_32.Each of them has a
_freethreadedvariant. The glibc Linux platforms now alsomatch on
--py_linux_libc, so that they do not overlap with the new muslplatform.
A new test ensures that each of the toolchain platform variants in
//python:versions.bzlhas a pip platform with the same constraints andsettings, so that adding a toolchain platform requires adding a pip platform.
The WORKSPACE
pip_parseuses the same definitions for selecting the wheels,so the
linux_ppc,linux_riscv64andlinux_s390xplatforms there can nowselect their platform specific wheels.
Work towards #3902