2021-08-09 15:26:06 +00:00
|
|
|
load("@rules_zapp//zapp:zapp.bzl",
|
|
|
|
"zapp_binary",
|
|
|
|
)
|
|
|
|
|
2021-08-29 21:07:56 +00:00
|
|
|
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"),
|
|
|
|
]
|
|
|
|
)
|
2021-08-29 21:07:56 +00:00
|
|
|
|
|
|
|
py_library(
|
|
|
|
name = "lib_hello",
|
|
|
|
srcs = [],
|
|
|
|
deps = [
|
|
|
|
py_requirement("pyyaml"),
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
zapp_binary(
|
|
|
|
name = "hello_lib_deps",
|
|
|
|
main = "hello.py",
|
|
|
|
deps = [
|
|
|
|
":lib_hello",
|
|
|
|
],
|
|
|
|
)
|