build(python): align toolchain with monorepo pattern
This commit is contained in:
24
MODULE.bazel
24
MODULE.bazel
@@ -7,29 +7,11 @@ bazel_dep(name = "bazel_skylib", version = "1.8.2")
|
||||
bazel_dep(name = "rules_python", version = "1.6.3")
|
||||
bazel_dep(name = "rules_rust", version = "0.74.0")
|
||||
|
||||
local_runtime_repo = use_repo_rule(
|
||||
"@rules_python//python/local_toolchains:repos.bzl",
|
||||
"local_runtime_repo",
|
||||
)
|
||||
local_runtime_toolchains_repo = use_repo_rule(
|
||||
"@rules_python//python/local_toolchains:repos.bzl",
|
||||
"local_runtime_toolchains_repo",
|
||||
)
|
||||
|
||||
local_runtime_repo(
|
||||
name = "local_python3",
|
||||
interpreter_path = "python3",
|
||||
on_failure = "fail",
|
||||
dev_dependency = True,
|
||||
)
|
||||
local_runtime_toolchains_repo(
|
||||
name = "local_python_toolchains",
|
||||
runtimes = ["local_python3"],
|
||||
dev_dependency = True,
|
||||
)
|
||||
python = use_extension("//bazel:python.bzl", "python")
|
||||
use_repo(python, "python")
|
||||
|
||||
rust = use_extension("//bazel:rust.bzl", "rust")
|
||||
use_repo(rust, "rust")
|
||||
|
||||
register_toolchains("@local_python_toolchains//:all", dev_dependency = True)
|
||||
register_toolchains("@python//:python")
|
||||
register_toolchains("@rust//:rust")
|
||||
|
||||
Reference in New Issue
Block a user