22 lines
638 B
Python
22 lines
638 B
Python
load("@databuild//databuild:rules.bzl", "databuild_dsl_generator")
|
|
|
|
# Python DSL library containing the graph definition
|
|
py_library(
|
|
name = "simple_dsl_src",
|
|
srcs = ["simple_graph.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"@databuild//databuild:py_proto",
|
|
"@databuild//databuild/dsl/python:dsl",
|
|
],
|
|
)
|
|
|
|
# DSL generator that creates bazel targets from the Python DSL
|
|
databuild_dsl_generator(
|
|
name = "simple_graph.generate",
|
|
graph_attr = "graph",
|
|
graph_file = "simple_graph.py",
|
|
output_package = "//",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":simple_dsl_src"],
|
|
)
|