2021-01-04 09:35:31 +01:00
|
|
|
load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
|
|
|
|
load("@rules_python//python:defs.bzl", "py_runtime")
|
|
|
|
|
|
|
|
py_runtime(
|
2021-04-09 10:17:38 +02:00
|
|
|
name = "python3_runtime",
|
|
|
|
files = ["@python_interpreter//:files"],
|
|
|
|
interpreter = "@python_interpreter//:python_bin",
|
2021-01-04 09:35:31 +01:00
|
|
|
python_version = "PY3",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
py_runtime_pair(
|
2021-04-09 10:17:38 +02:00
|
|
|
name = "py_runtime_pair",
|
|
|
|
py2_runtime = None,
|
|
|
|
py3_runtime = ":python3_runtime",
|
2021-01-04 09:35:31 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
2021-04-09 10:17:38 +02:00
|
|
|
name = "py_3_toolchain",
|
|
|
|
toolchain = ":py_runtime_pair",
|
2021-01-04 09:35:31 +01:00
|
|
|
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
|
|
|
|
)
|
|
|
|
|
|
|
|
exports_files([
|
|
|
|
"requirements.txt",
|
|
|
|
])
|