hyperboria/rules/python/BUILD.bazel

41 lines
946 B
Python
Raw Normal View History

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",
])