MODULE: try to support multiple python versions loading all toolchains
diff --git a/MODULE.bazel b/MODULE.bazel index 73f2d2f..aed5a9e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel
@@ -10,5 +10,17 @@ bazel_dep(name = "rules_cc", version = "0.2.9") bazel_dep(name = "rules_python", version = "1.6.3") +python = use_extension("@rules_python//python/extensions:python.bzl", "python") +python.defaults( + # The environment variable takes precedence if set. + python_version = "3.12", + python_version_env = "BAZEL_PYTHON_VERSION", +) +python.toolchain(python_version = "3.10") +python.toolchain(python_version = "3.11") +python.toolchain(python_version = "3.12") +python.toolchain(python_version = "3.13") +python.toolchain(python_version = "3.14") + internal_configure = use_extension("//:internal_configure.bzl", "internal_configure_extension") use_repo(internal_configure, "pybind11")