2021-04-08 06:37:51 +00:00
|
|
|
load("@rules_python//python:defs.bzl",
|
|
|
|
"py_runtime_pair"
|
|
|
|
)
|
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
licenses(["notice"])
|
|
|
|
|
|
|
|
exports_files([
|
|
|
|
"defs.bzl",
|
|
|
|
"bzl_pytest_shim.py",
|
|
|
|
"bzl_unittest_shim.py",
|
|
|
|
])
|
|
|
|
|
|
|
|
py_runtime(
|
2021-08-30 03:59:32 +00:00
|
|
|
name = "python3_runtime",
|
2021-08-30 01:23:39 +00:00
|
|
|
files = [],
|
|
|
|
interpreter_path = "/usr/bin/python3.9",
|
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 = [
|
|
|
|
py_requirement("requests"),
|
2021-05-31 18:28:46 +00:00
|
|
|
py_requirement("requirements-parser"),
|
2021-04-08 06:37:51 +00:00
|
|
|
]
|
|
|
|
)
|