Skip to content

feat(pypi): incrementally build platform configuration #3112 #3112

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

aignas
Copy link
Collaborator

@aignas aignas commented Jul 21, 2025

DO NOT MERGE: stacked on #3111.

Before this PR the configuration for platforms would be built
non-incrementally, making it harder for users to override particular
attributes of the already configured ones.

With this PR the new features introduced in #3058 will be easier to
override.

Work towards #2747

@aignas aignas requested review from rickeylev and groodt as code owners July 21, 2025 03:26
@aignas aignas added the type: pip pip/pypi integration label Jul 21, 2025
@aignas aignas force-pushed the feat.build.platforms branch from 6d83314 to d547f24 Compare August 3, 2025 05:18
@aignas aignas force-pushed the feat.build.platforms branch from d547f24 to 2b56f94 Compare August 9, 2025 12:19
@aignas aignas changed the title feat(pypi): incrementally build platform configuration feat(pypi): incrementally build platform configuration #3112 Aug 9, 2025
aignas added 3 commits August 9, 2025 21:19
Before this PR we would be constructing slightly different environments
when the `env_marker_setting` is doing it in the analysis phase and when
we are doing it in the repo phase due to how the defaults are handled.

In this change we simply reuse the same select statements and add an extra
helper that is allowing us to process that.

Work towards bazel-contrib#2949
Prep for bazel-contrib#3058
This will be needed when we start selecting wheels entirely in the
bzlmod extension evaluation phase (bazel-contrib#3058).

This adds a few unit tests to just ensure that we conform to the spec
even though the code is very simple.

Work towards bazel-contrib#2747
Work towards bazel-contrib#2759
Work towards bazel-contrib#2849
DO NOT MERGE: stacked on bazel-contrib#3110

This PR only implements the selection algorithm where instead of
selecting all wheels that are compatible with the set of target
platforms, we select a single wheel that is most specialized for a
particular *single* target platform.

What is more, compared to the existing algorithm it does not assume
a particular list of supported platforms and just fully implements the
spec.

Work towards bazel-contrib#2747
Work towards bazel-contrib#2759
Work towards bazel-contrib#2849
@aignas aignas force-pushed the feat.build.platforms branch 4 times, most recently from 47539df to d5075c3 Compare August 10, 2025 14:56
@aignas aignas marked this pull request as draft August 10, 2025 14:56
Before this PR the configuration for platforms would be built
non-incrementally and was somewhat special, making it harder to override
particular attributes of the already configured ones.
@aignas aignas force-pushed the feat.build.platforms branch from d5075c3 to 7d36af2 Compare August 10, 2025 15:08
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

Successfully merging this pull request may close these issues.

1 participant