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"), ] ) 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)", )