12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- load("@rules_python//python:defs.bzl", "py_binary")
- load("@deps//:requirements.bzl", "requirement")
- py_binary(
- name = "main",
- srcs = ["main.py"],
- data = glob(["templates/*.mustache", "static/*"]),
- deps = [
- requirement("Markdown"),
- requirement("pystache"),
- requirement("PyYAML"),
- requirement("base58"),
- ]
- )
- py_binary(
- name = "experimental",
- srcs = ["experimental.py"],
- data = glob(["templates/*.mustache", "static/*"]),
- deps = [
- requirement("Markdown"),
- requirement("pystache"),
- requirement("PyYAML"),
- ]
- )
- filegroup(
- name = "data",
- srcs=glob(["quips/*", "quotes/*", "works/**/*", "works.json"], exclude=["**/*~"]),
- )
- genrule(
- name = "out",
- srcs = [":data"] + glob(["templates/*.mustache", "static/*"]),
- tools = [":main"],
- outs = ["output"],
- cmd = "$(location :main) $(location output) $(locations :data)",
- )
- genrule(
- name = "experiment",
- srcs = [":data"] + glob(["templates/*.mustache", "static/*"]),
- tools = [":experimental"],
- outs = ["exp"],
- cmd = "$(location :experimental) $(location exp) $(locations :data)",
- )
|