2020-11-22 06:30:59 +01:00
|
|
|
load("@py_deps//:requirements.bzl", "requirement")
|
|
|
|
|
2020-11-22 07:20:21 +01:00
|
|
|
fluent_syntax = [
|
2021-01-04 04:06:40 +01:00
|
|
|
requirement("fluent.syntax"),
|
|
|
|
requirement("compare-locales"),
|
2020-11-22 07:20:21 +01:00
|
|
|
# undeclared runtime dependency
|
|
|
|
requirement("six"),
|
|
|
|
]
|
|
|
|
|
2020-11-18 07:17:19 +01:00
|
|
|
filegroup(
|
|
|
|
name = "ftl",
|
|
|
|
srcs = [
|
|
|
|
"@rslib_ftl//:files",
|
|
|
|
"@extra_ftl//:files",
|
|
|
|
] + glob(["**/*.ftl"]),
|
|
|
|
visibility = ["//rslib:__subpackages__"],
|
|
|
|
)
|
|
|
|
|
2020-11-22 06:30:59 +01:00
|
|
|
py_binary(
|
|
|
|
name = "format",
|
|
|
|
srcs = ["format.py"],
|
2020-11-22 07:20:21 +01:00
|
|
|
deps = fluent_syntax,
|
2020-11-22 06:30:59 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
py_test(
|
|
|
|
name = "format_check",
|
|
|
|
srcs = [
|
|
|
|
"format.py",
|
|
|
|
"format_check.py",
|
|
|
|
],
|
|
|
|
# so we can locate data files
|
|
|
|
args = ["$(location BUILD.bazel)"],
|
|
|
|
data = glob(["**/*.ftl"]) + ["BUILD.bazel"],
|
2020-11-22 07:20:21 +01:00
|
|
|
deps = fluent_syntax,
|
2020-11-22 06:30:59 +01:00
|
|
|
)
|
|
|
|
|
2020-11-22 06:37:18 +01:00
|
|
|
py_binary(
|
|
|
|
name = "sync",
|
|
|
|
srcs = ["sync.py"],
|
|
|
|
tags = ["manual"],
|
|
|
|
)
|
|
|
|
|
|
|
|
py_binary(
|
|
|
|
name = "extract-strings",
|
|
|
|
srcs = ["extract-strings.py"],
|
|
|
|
tags = ["manual"],
|
2020-11-22 07:20:21 +01:00
|
|
|
deps = fluent_syntax,
|
2020-11-22 06:37:18 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
py_binary(
|
|
|
|
name = "transform-string",
|
|
|
|
srcs = ["transform-string.py"],
|
|
|
|
tags = ["manual"],
|
2020-11-22 07:20:21 +01:00
|
|
|
deps = fluent_syntax,
|
2020-11-22 06:37:18 +01:00
|
|
|
)
|
|
|
|
|
2021-02-06 13:18:21 +01:00
|
|
|
py_binary(
|
|
|
|
name = "duplicate-string",
|
|
|
|
srcs = ["duplicate-string.py"],
|
|
|
|
tags = ["manual"],
|
|
|
|
deps = fluent_syntax,
|
|
|
|
)
|
|
|
|
|
2020-11-18 07:17:19 +01:00
|
|
|
# export this file as a way of locating the top level folder in $(location ...)
|
|
|
|
exports_files(
|
|
|
|
["BUILD.bazel"],
|
|
|
|
visibility = ["//rslib:__subpackages__"],
|
|
|
|
)
|