hyperboria/rules/python/BUILD.bazel
the-superpirate a51463c027 - repo(nexus): Refactoring legacy
- feat(nexus): Remove legacy functions
3 internal commit(s)

GitOrigin-RevId: d4c640bdf886fb17b0996433911ca33cd76a2091
2021-04-11 17:44:12 +03:00

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