BUILD.bazel 657 B

1234567891011121314151617181920212223242526
  1. load("@rules_python//python:defs.bzl", "py_binary")
  2. load("@deps//:requirements.bzl", "requirement")
  3. py_binary(
  4. name = "main",
  5. srcs = ["main.py"],
  6. data = glob(["templates/*.mustache", "static/*"]),
  7. deps = [
  8. requirement("Markdown"),
  9. requirement("pystache"),
  10. requirement("PyYAML"),
  11. ]
  12. )
  13. filegroup(
  14. name = "data",
  15. srcs=glob(["quips/*", "quotes/*", "works/**/*", "works.json"], exclude=["*~"]),
  16. )
  17. genrule(
  18. name = "out",
  19. srcs = [":data"] + glob(["templates/*.mustache", "static/*"]),
  20. tools = [":main"],
  21. outs = ["output"],
  22. cmd = "$(location :main) $(location output) $(locations :data)",
  23. )