anki/pylib/tools/BUILD.bazel
Damien Elmes 048a9a2b60 vendor stringcase
It's a tiny library that has not been updated in years, and it was
leading to a warning on startup:

 DeprecationWarning: invalid escape sequence \W
  return re.sub("\W+", "", string)
2021-10-22 08:56:44 +10:00

65 lines
1.2 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"),
"//pylib/anki/_vendor:stringcase",
],
)
py_binary(
name = "rewrite_tr",
srcs = [
"rewrite_tr.py",
],
tags = ["manual"],
deps = [
"//pylib/anki/_vendor:stringcase",
],
)
filegroup(
name = "py_source_files",
srcs = glob(["*.py"]),
visibility = ["//pylib:__subpackages__"],
)