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-11 16:39:25 +02:00
|
|
|
name = "python2.7",
|
|
|
|
files = [],
|
|
|
|
interpreter_path = select({
|
|
|
|
"//:osx": "/usr/local/bin/python2.7",
|
|
|
|
"//:linux": "/usr/bin/python2.7",
|
|
|
|
}),
|
|
|
|
python_version = "PY2",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
py_runtime(
|
|
|
|
name = "python3",
|
|
|
|
files = [],
|
|
|
|
interpreter_path = select({
|
|
|
|
"//:osx": "/usr/local/bin/python3.9",
|
|
|
|
"//:linux": "/usr/bin/python3.9",
|
|
|
|
}),
|
2021-01-04 09:35:31 +01:00
|
|
|
python_version = "PY3",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
py_runtime_pair(
|
2021-04-11 16:39:25 +02:00
|
|
|
name = "hyperboria_py_runtime_pair",
|
|
|
|
py2_runtime = ":python2.7",
|
|
|
|
py3_runtime = ":python3",
|
2021-01-04 09:35:31 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
2021-04-11 16:39:25 +02:00
|
|
|
name = "py_toolchain",
|
|
|
|
toolchain = ":hyperboria_py_runtime_pair",
|
2021-01-04 09:35:31 +01:00
|
|
|
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
|
|
|
|
)
|
|
|
|
|
|
|
|
exports_files([
|
|
|
|
"requirements.txt",
|
|
|
|
])
|