mirror of
https://github.com/nexus-stc/hyperboria
synced 2024-12-24 02:25:48 +01:00
41 lines
946 B
Python
41 lines
946 B
Python
|
load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
|
||
|
load("@rules_python//python:defs.bzl", "py_runtime")
|
||
|
|
||
|
py_runtime(
|
||
|
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",
|
||
|
}),
|
||
|
python_version = "PY3",
|
||
|
visibility = ["//visibility:public"],
|
||
|
)
|
||
|
|
||
|
py_runtime_pair(
|
||
|
name = "hyperboria_py_runtime_pair",
|
||
|
py2_runtime = ":python2.7",
|
||
|
py3_runtime = ":python3",
|
||
|
)
|
||
|
|
||
|
toolchain(
|
||
|
name = "py_toolchain",
|
||
|
toolchain = ":hyperboria_py_runtime_pair",
|
||
|
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
|
||
|
)
|
||
|
|
||
|
exports_files([
|
||
|
"requirements.txt",
|
||
|
])
|