diff options
Diffstat (limited to 'tools/interface_generator/BUILD.bazel')
-rw-r--r-- | tools/interface_generator/BUILD.bazel | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/tools/interface_generator/BUILD.bazel b/tools/interface_generator/BUILD.bazel index 2e700a2..c6f4a79 100644 --- a/tools/interface_generator/BUILD.bazel +++ b/tools/interface_generator/BUILD.bazel @@ -1,4 +1,6 @@ load("@rules_python//python:pip.bzl", "compile_pip_requirements") +load("@rules_python//python/entry_points:py_console_script_binary.bzl", "py_console_script_binary") +load(":defs.bzl", "generate_interface") package(default_visibility = ["//visibility:public"]) @@ -9,17 +11,31 @@ compile_pip_requirements( requirements_txt = "requirements_lock.txt", ) +py_console_script_binary( + name = "pylint", + pkg = "@pip//pylint", + script = "pylint", +) + py_binary( name = "interface_generator", - srcs = ["interface_generator.py"], - args = ["-l", "$(location LICENSE.md)"], - data = glob(["templates/*"]) + ["LICENSE.md"], + srcs = [ + "interface_definition.py", + "interface_generator.py", + "templates.py", + ], + data = glob(["templates/*"]), + main = "interface_generator.py", deps = [ "@pip//mako", ], ) -alias( - name = "smokeTest", - actual = ":interface_generator", +py_test( + name = "templates_unittest", + srcs = ["templates_unittest.py", "templates.py"], + data = glob(["templates/*"]), + deps = ["@pip//mako"], ) + +exports_files(["LICENSE.md"]) |