source/tools/python/BUILD

48 lines
907 B
Python
Raw Normal View History

2021-04-08 06:37:51 +00:00
load("@rules_python//python:defs.bzl",
"py_runtime_pair",
2021-04-08 06:37:51 +00:00
)
load("@arrdem_source_pypi//:requirements.bzl", "all_requirements")
2021-04-08 06:37:51 +00:00
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
exports_files([
"defs.bzl",
"bzl_pytest_shim.py",
"bzl_unittest_shim.py",
"pythonshim",
2021-04-08 06:37:51 +00:00
])
py_runtime(
2021-08-30 03:59:32 +00:00
name = "python3_runtime",
2021-08-30 01:23:39 +00:00
files = [],
interpreter = ":pythonshim",
2021-04-08 06:37:51 +00:00
python_version = "PY3",
visibility = ["//visibility:public"],
)
py_runtime_pair(
2021-08-30 03:59:32 +00:00
name = "python_runtime",
2021-04-08 06:37:51 +00:00
py2_runtime = None,
2021-08-30 03:59:32 +00:00
py3_runtime = ":python3_runtime",
2021-04-08 06:37:51 +00:00
)
toolchain(
2021-08-30 03:59:32 +00:00
name = "python3_toolchain",
toolchain = ":python_runtime",
2021-04-08 06:37:51 +00:00
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
)
py_pytest(
name = "test_licenses",
srcs = [
"test_licenses.py",
],
data = [
"requirements.txt",
],
deps = all_requirements,
2021-04-08 06:37:51 +00:00
)