rules_zapp/example/BUILD

41 lines
682 B
Python
Raw Normal View History

2021-08-09 15:26:06 +00:00
load("@rules_zapp//zapp:zapp.bzl",
"zapp_binary",
)
load("@rules_python//python:defs.bzl", "py_library")
2021-08-09 15:26:06 +00:00
load("@my_deps//:requirements.bzl",
py_requirement="requirement",
)
zapp_binary(
name = "hello_script",
main = "hello.py",
# entry_point is inferred from main =
)
zapp_binary(
name = "hello_deps",
main = "hello.py",
# deps also get zapped via their underlying wheels
deps = [
py_requirement("pyyaml"),
]
)
py_library(
name = "lib_hello",
srcs = [],
deps = [
py_requirement("pyyaml"),
]
)
zapp_binary(
name = "hello_lib_deps",
main = "hello.py",
deps = [
":lib_hello",
],
)