mirror of
https://github.com/nexus-stc/hyperboria
synced 2024-12-23 18:17:45 +01:00
8472f27ec5
GitOrigin-RevId: ddf02e70d2827c048db49b687ebbcdcc67807ca6
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",
|
|
])
|