load("@rules_python//python:pip.bzl", "compile_pip_requirements") load("@rules_python//python:defs.bzl", "py_binary") py_binary( name = "generate", srcs = ["generate.py"], deps = [ "@pypi//chevron:pkg", "@pypi//importlib_metadata:pkg", "@pypi//markdown:pkg", "@pypi//pyyaml:pkg", ] ) filegroup( name="static", srcs=glob(["static/*"]), ) filegroup( name="templates", srcs=glob(["templates/*"]), ) genrule( name = "out", srcs = [ ":projects.yaml", ":static", ":templates", ], tools = [":generate"], outs = ["output"], cmd = "$(location :generate) $(location output) $(location :projects.yaml) $(locations :static) $(locations :templates)", ) compile_pip_requirements( name = "requirements", requirements_txt = "requirements.txt", )