Skip to content

dotoleeoak/rules-python-2921-repro

Repository files navigation

rules_python #2921: all_requirements fails for multiple python versions

Issue: bazel-contrib/rules_python#2921

Expected output

❯ bazel run //:run_3_10
INFO: Analyzed target //:run_3_10 (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:run_3_10 up-to-date:
  bazel-bin/run_3_10
INFO: Elapsed time: 0.478s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/run_3_10
Python version: 3.10.18 (main, Jul  8 2025, 20:41:41) [Clang 20.1.4 ]
Python executable: /private/var/tmp/_bazel_dotol/4fd87d9587f59c310de02faee365a150/execroot/_main/bazel-out/darwin_arm64-fastbuild-ST-0d3860f234bd/bin/run_3_10.runfiles/rules_python++python+python_3_10_aarch64-apple-darwin/bin/python3
✅ tomli is available.
❯ bazel run //:run_3_11
INFO: Analyzed target //:run_3_11 (4 packages loaded, 4696 targets configured).
INFO: Found 1 target...
Target //:run_3_11 up-to-date:
  bazel-bin/run_3_11
INFO: Elapsed time: 0.417s, Critical Path: 0.14s
INFO: 4 processes: 2 action cache hit, 4 internal.
INFO: Build completed successfully, 4 total actions
INFO: Running command line: bazel-bin/run_3_11
Python version: 3.11.13 (main, Jul  8 2025, 20:42:09) [Clang 20.1.4 ]
Python executable: /private/var/tmp/_bazel_dotol/4fd87d9587f59c310de02faee365a150/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/run_3_11.runfiles/rules_python++python+python_3_11_aarch64-apple-darwin/bin/python3
❌ tomli is not available.

Actual output

❯ bazel run //:run_3_11
DEBUG: /private/var/tmp/_bazel_dotol/4fd87d9587f59c310de02faee365a150/external/rules_python+/python/private/config_settings.bzl:227:14: The current configuration rules_python config flags is:
    @@rules_python+//python/config_settings:pip_whl: "auto"
    @@rules_python+//python/config_settings:pip_whl_glibc_version: ""
    @@rules_python+//python/config_settings:pip_whl_muslc_version: ""
    @@rules_python+//python/config_settings:pip_whl_osx_arch: "arch"
    @@rules_python+//python/config_settings:pip_whl_osx_version: ""
    @@rules_python+//python/config_settings:py_freethreaded: "no"
    @@rules_python+//python/config_settings:py_linux_libc: "glibc"
    @@rules_python+//python/config_settings:python_version: "3.11"

If the value is missing, then the default value is being used, see documentation:
https://rules-python.readthedocs.io/en/latest/api/rules_python/python/config_settings
ERROR: /private/var/tmp/_bazel_dotol/4fd87d9587f59c310de02faee365a150/external/rules_python++pip+pypi/tomli/BUILD.bazel:5:12: configurable attribute "actual" in @@rules_python++pip+pypi//tomli:_no_matching_repository doesn't match this configuration: No matching wheel for current configuration's Python version.

The current build configuration's Python version doesn't match any of the Python
wheels available for this distribution. This distribution supports the following Python
configuration settings:
    //_config:is_cp310

To determine the current configuration's Python version, run:
    `bazel config <config id>` (shown further below)

For the current configuration value see the debug message above that is
printing the current flag values. If you can't see the message, then re-run the
build to make it a failure instead by running the build with:
    --@@rules_python+//python/config_settings:current_config=fail

However, the command above will hide the `bazel config <config id>` message.


This instance of @@rules_python++pip+pypi//tomli:_no_matching_repository has configuration identifier 0de042f. To inspect its configuration, run: bazel config 0de042f.

For more help, see https://bazel.build/docs/configurable-attributes#faq-select-choose-condition.

ERROR: Analysis of target '//:run_3_11' failed; build aborted: Analysis failed
INFO: Elapsed time: 2.350s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED:
    Fetching repository @@rules_python++python+python_3_11_aarch64-apple-darwin; starting
    Fetching repository @@rules_python++pip+pypi_311_mypy_extensions; starting
    Fetching repository @@rules_python++pip+pypi_311_typing_extensions; starting
    Fetching repository @@rules_python++pip+pypi_311_mypy; starting

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors