aboutsummaryrefslogtreecommitdiff
path: root/tools/interface_generator/bin/BUILD.bazel
blob: 04843b9ace231f09be4f76e8bebf51bc0bd21ef2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
load("@pip//:requirements.bzl", "requirement")
load("//private:defs.bzl", "py_pytest")

""" interface declaration """

py_library(
    name = "interface_declaration",
    srcs = ["interface_declaration.py"],
)

""" templates """

py_library(
    name = "templates",
    srcs = ["templates.py"],
    data = glob(["templates/*"]),
)

""" interface_generator """

py_binary(
    name = "interface_generator",
    srcs = [
        "interface_generator.py",
        "templates.py",
    ],
    imports = ["."],
    visibility = ["//visibility:public"],
    deps = [
        ":interface_declaration",
        ":templates",
        requirement("mako"),
    ],
)

""" pytest """

py_pytest(
    name = "pytest",
    srcs = glob(["*.py"]),
    data = glob(["templates/*"]),
    deps = [
        requirement("mako"),
    ],
)