You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
861 B
41 lines
861 B
load("@rules_python//python:defs.bzl", "py_binary")
|
|
load("@rules_python//python:defs.bzl", "py_runtime_pair")
|
|
load("@pip_requirements//:requirements.bzl", "requirement")
|
|
|
|
py_runtime(
|
|
name = "python37",
|
|
interpreter_path = "/usr/local/bin/python3.7",
|
|
python_version = "PY3"
|
|
)
|
|
|
|
py_runtime(
|
|
name = "python38",
|
|
interpreter_path = "/usr/local/bin/python3.8",
|
|
python_version = "PY3"
|
|
)
|
|
|
|
py_runtime_pair(
|
|
name = "py_runtime_pair",
|
|
py3_runtime = ":python37",
|
|
# py3_runtime = ":python38",
|
|
)
|
|
|
|
toolchain(
|
|
name = "python_toolchain",
|
|
toolchain = ":py_runtime_pair",
|
|
toolchain_type = "@rules_python//python:toolchain_type",
|
|
)
|
|
)
|
|
|
|
py_binary(
|
|
name = "main",
|
|
srcs = ["main.py"],
|
|
args = [
|
|
"--cool",
|
|
],
|
|
srcs_version = "PY3",
|
|
deps = [
|
|
requirement("pyyaml"),
|
|
requirement("flask"),
|
|
],
|
|
)
|
|
|