build(python): align toolchain with monorepo pattern
This commit is contained in:
25
bazel/python.BUILD.template
Normal file
25
bazel/python.BUILD.template
Normal file
@@ -0,0 +1,25 @@
|
||||
load("@rules_python//python:py_runtime.bzl", "py_runtime")
|
||||
load("@rules_python//python:py_runtime_pair.bzl", "py_runtime_pair")
|
||||
|
||||
py_runtime(
|
||||
name = "runtime",
|
||||
implementation_name = "cpython",
|
||||
interpreter_path = "{interpreter_path}",
|
||||
interpreter_version_info = {
|
||||
"major": "{major}",
|
||||
"minor": "{minor}",
|
||||
"micro": "{micro}",
|
||||
},
|
||||
python_version = "PY3",
|
||||
)
|
||||
|
||||
py_runtime_pair(
|
||||
name = "runtime_pair",
|
||||
py3_runtime = ":runtime",
|
||||
)
|
||||
|
||||
toolchain(
|
||||
name = "python",
|
||||
toolchain = ":runtime_pair",
|
||||
toolchain_type = "@rules_python//python:toolchain_type",
|
||||
)
|
||||
Reference in New Issue
Block a user