Support Python 3.11-3.14 for @pip in MODULE.bazel Register Python 3.11-3.14 toolchains and pip.parse hubs in MODULE.bazel so downstream Bzlmod consumers using a default Python version other than 3.11 can resolve @pip dependencies required by //compiler/back_end/cpp:emboss_codegen_cpp.
diff --git a/MODULE.bazel b/MODULE.bazel index f8c6852..4db1e93 100644 --- a/MODULE.bazel +++ b/MODULE.bazel
@@ -19,10 +19,35 @@ bazel_dep(name = "rules_shell", version = "0.3.0") bazel_dep(name = "rules_license", version = "0.0.8") +python = use_extension("@rules_python//python/extensions:python.bzl", "python") + +[ + python.toolchain( + is_default = python_version == "3.11", + python_version = python_version, + ) + for python_version in [ + "3.11", + "3.12", + "3.13", + "3.14", + ] +] + pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") -pip.parse( - hub_name = "pip", - python_version = "3.11", - requirements_lock = "//:requirements.txt", -) + +[ + pip.parse( + hub_name = "pip", + python_version = python_version, + requirements_lock = "//:requirements.txt", + ) + for python_version in [ + "3.11", + "3.12", + "3.13", + "3.14", + ] +] + use_repo(pip, "pip")