2023-03-08 22:11:09 +00:00
|
|
|
load("@rules_python//python:defs.bzl",
|
|
|
|
"py_runtime_pair",
|
|
|
|
)
|
|
|
|
|
2023-03-15 06:45:32 +00:00
|
|
|
load("@pypi//:requirements.bzl", "all_requirements")
|
2023-03-08 22:11:09 +00:00
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
licenses(["notice"])
|
|
|
|
|
|
|
|
exports_files([
|
|
|
|
"defs.bzl",
|
|
|
|
"bzl_pytest_shim.py",
|
|
|
|
"bzl_unittest_shim.py",
|
|
|
|
"pythonshim",
|
2023-03-15 06:45:32 +00:00
|
|
|
"requirements_lock.txt",
|
2023-03-08 22:11:09 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
py_runtime(
|
|
|
|
name = "python3_runtime",
|
|
|
|
files = [],
|
|
|
|
interpreter = ":pythonshim",
|
|
|
|
python_version = "PY3",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
py_runtime_pair(
|
|
|
|
name = "python_runtime",
|
|
|
|
py2_runtime = None,
|
|
|
|
py3_runtime = ":python3_runtime",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
|
|
|
name = "python3_toolchain",
|
|
|
|
toolchain = ":python_runtime",
|
|
|
|
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
|
|
|
|
)
|
|
|
|
|
|
|
|
py_pytest(
|
|
|
|
name = "test_licenses",
|
|
|
|
srcs = [
|
|
|
|
"test_licenses.py",
|
|
|
|
],
|
|
|
|
deps = all_requirements,
|
|
|
|
)
|