-
Notifications
You must be signed in to change notification settings - Fork 69
/
BUILD.bazel
69 lines (61 loc) · 1.67 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
load("//:gapic_generator_python.bzl", "pandoc_binary", "pandoc_toolchain")
load("@gapic_generator_python_pip_deps//:requirements.bzl", "requirement")
load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
toolchain_type(
name = "pandoc_toolchain_type",
visibility = ["//visibility:public"],
)
pandoc_toolchain(
exec_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
platform = "linux",
)
pandoc_toolchain(
exec_compatible_with = [
"@platforms//os:osx",
"@platforms//cpu:x86_64",
],
platform = "macOS",
)
pandoc_binary(
name = "pandoc_binary",
)
py_runtime(
name = "pyenv3_runtime",
interpreter = ":pyenv3wrapper.sh",
python_version = "PY3",
)
py_runtime_pair(
name = "pyenv3_runtime_pair",
py3_runtime = ":pyenv3_runtime",
)
toolchain(
name = "pyenv3_toolchain",
toolchain = ":pyenv3_runtime_pair",
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
)
py_binary(
name = "gapic_plugin",
srcs = glob(["gapic/**/*.py"]),
data = [":pandoc_binary"] + glob([
"gapic/**/*.j2",
"gapic/**/.*.j2",
]),
main = "gapic/cli/generate_with_pandoc.py",
python_version = "PY3",
visibility = ["//visibility:public"],
deps = [
"@com_github_grpc_grpc//src/python/grpcio/grpc:grpcio",
requirement("protobuf"),
requirement("click"),
requirement("google-api-core"),
requirement("googleapis-common-protos"),
requirement("jinja2"),
requirement("MarkupSafe"),
requirement("pypandoc"),
requirement("PyYAML"),
requirement("grpc-google-iam-v1"),
],
)