feat(pip.parse): limit the target platforms we parse requirements for by aignas · Pull Request #3441 · bazel-contrib/rules_python
Up until now the users can configure which requirements files to be used
for specific platforms, however, what they cannot configure is what
target platforms should actually be set up.
The difference in the problems is:
1. I want my `bazel build` to work on `osx aarch64` and `linux x86_64`.
1. I want my `bazel build` to build for `linux x86_64` on `osx aarch64`.
With the newly introduced `target_platforms` attribute users can finally
specify their target platforms. To ensure that this also allows users to
specify that they want to support `freethreaded` and `non-freethreaded`
platforms at the same time we support `{os}` and `{arch}` templating in
the strings.
This should fix the `genquery` usage pattern breakage when we previously
enabled `RULES_PYTHON_ENABLE_PIPSTAR=1`.
Work towards bazel-contrib#2949
aignas
marked this pull request as draft
aignas
marked this pull request as ready for review
github-merge-queue bot pushed a commit that referenced this pull request
Dec 7, 2025gh-worker-dd-mergequeue-cf854d bot pushed a commit to DataDog/datadog-agent that referenced this pull request
Feb 9, 2026### What does this PR do? Update `rules_python` from version 1.6.3 to 1.8.3 with the aim at reducing the number of warnings seen in CI, which tend to indicate an underlying combinatorial explosion when looking for Python wheels. ### Motivation Some CI runs generate thousands of warnings like: ``` DEBUG: rules_python:pypi:create_whl_repos WARNING: Could not find a whl or an sdist with sha256=... ``` ([example](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1406186495)). While switching to version 1.8.x alone is unlikely to eliminate all warnings, it brings changes that should help reduce their frequency: - bazel-contrib/rules_python#3225 - bazel-contrib/rules_python#3385 - bazel-contrib/rules_python#3441 - bazel-contrib/rules_python#3432 - bazel-contrib/rules_python#3447 ### Describe how you validated your changes For that, I'll be monitoring logs once the change is merged to the mainline, see why below. ### Additional Notes Coming next: - this is a mitigation/preparation step: if warning counts don't decrease significantly, the next step would be to add `target_platforms` to the `pip.parse()` configuration to explicitly limit platform checks, which is worth a dedicated PR, - even if it's tiny, the patch on `rules_python` must be removed once bazel-contrib/rules_python#3579 is addressed. Without it, we used to face `ValueError`s which were preventing the version bump. Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
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