anki/pylib/tools/BUILD.bazel
Damien Elmes e7483edee7 update mypy and other Python deps
latest mypy_protobuf can no longer be run directly, so we need
to run a wrapper instead
2021-02-01 15:50:04 +10:00

54 lines
1.0 KiB
Python

load("@rules_python//python:defs.bzl", "py_binary", "py_library")
load("@py_deps//:requirements.bzl", "requirement")
py_binary(
name = "protoc-gen-mypy",
srcs = ["protoc-gen-mypy.py"],
visibility = [
"//visibility:public",
],
deps = [requirement("mypy-protobuf")],
)
py_binary(
name = "protoc_wrapper",
srcs = ["protoc_wrapper.py"],
visibility = [
"//visibility:public",
],
deps = [
":protoc-gen-mypy",
"@rules_python//python/runfiles",
],
)
py_library(
name = "hookslib",
srcs = ["hookslib.py"],
imports = ["."],
visibility = [
"//pylib:__subpackages__",
"//qt:__pkg__",
],
)
py_binary(
name = "genhooks",
srcs = [
"genhooks.py",
"hookslib.py",
],
imports = ["."],
visibility = ["//pylib:__subpackages__"],
deps = [
requirement("black"),
requirement("stringcase"),
],
)
filegroup(
name = "py_source_files",
srcs = glob(["*.py"]),
visibility = ["//pylib:__subpackages__"],
)