forked from googleapis/protoc-docs-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
50 lines (44 loc) · 1.14 KB
/
BUILD.bazel
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
46
47
48
49
50
load("//:docs_plugin.bzl", "pandoc_binary", "pandoc_toolchain")
toolchain_type(
name = "pandoc_toolchain_type",
visibility = ["//visibility:public"],
)
pandoc_toolchain(
exec_compatible_with = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:x86_64",
],
platform = "linux",
)
pandoc_toolchain(
exec_compatible_with = [
"@bazel_tools//platforms:osx",
"@bazel_tools//platforms:x86_64",
],
platform = "macOS",
)
pandoc_binary(
name = "pandoc_binary"
)
py_binary(
name = "docs_plugin",
main = "protoc_docs/bin/py_docstring_pandoc.py",
srcs = glob(["protoc_docs/**/*.py"]),
visibility = ["//visibility:public"],
data = [":pandoc_binary"],
deps = [
"@com_google_protobuf//:protobuf_python",
"@pypi_pypandoc//:lib",
],
)
py_binary(
name = "docs_desc_converter",
main = "protoc_docs/bin/py_desc_converter_pandoc.py",
srcs = glob(["protoc_docs/**/*.py"]),
visibility = ["//visibility:public"],
data = [":pandoc_binary"],
deps = [
"@com_google_protobuf//:protobuf_python",
"@pypi_pypandoc//:lib",
],
)