1
1
load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
2
2
3
- _PANDOC_BUILD_FILE = """
4
- filegroup(
5
- name = "pandoc",
6
- srcs = ["bin/pandoc"],
7
- visibility = ["//visibility:public"],
8
- )"""
9
-
10
3
def gapic_generator_python ():
11
4
12
5
_maybe (
@@ -25,47 +18,6 @@ def gapic_generator_python():
25
18
strip_prefix = "grpc-{}" .format (_grpc_version ),
26
19
url = "https://github.com/grpc/grpc/archive/v{}.zip" .format (_grpc_version ),
27
20
)
28
-
29
- _maybe (
30
- http_archive ,
31
- name = "pandoc_linux_arm_64" ,
32
- build_file_content = _PANDOC_BUILD_FILE ,
33
- strip_prefix = "pandoc-3.7.0.2" ,
34
- url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-arm64.tar.gz" ,
35
- )
36
-
37
- _maybe (
38
- http_archive ,
39
- name = "pandoc_linux_x86_64" ,
40
- build_file_content = _PANDOC_BUILD_FILE ,
41
- strip_prefix = "pandoc-3.7.0.2" ,
42
- url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-amd64.tar.gz" ,
43
- )
44
-
45
- _maybe (
46
- http_archive ,
47
- name = "pandoc_macOS_arm_64" ,
48
- build_file_content = _PANDOC_BUILD_FILE ,
49
- strip_prefix = "pandoc-3.7.0.2" ,
50
- url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-arm64-macOS.zip" ,
51
- )
52
-
53
- _maybe (
54
- http_archive ,
55
- name = "pandoc_macOS_x86_64" ,
56
- build_file_content = _PANDOC_BUILD_FILE ,
57
- strip_prefix = "pandoc-3.7.0.2" ,
58
- url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-x86_64-macOS.zip" ,
59
- )
60
-
61
- _maybe (
62
- http_archive ,
63
- name = "pandoc_windows_x86_64" ,
64
- build_file_content = _PANDOC_BUILD_FILE ,
65
- strip_prefix = "pandoc-3.7.0.2" ,
66
- url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-windows-x86_64.zip" ,
67
- )
68
-
69
21
_rules_gapic_version = "0.5.4"
70
22
_maybe (
71
23
http_archive ,
@@ -81,14 +33,6 @@ def gapic_generator_python():
81
33
urls = ["https://github.com/googleapis/googleapis/archive/{}.zip" .format (_commit_sha )],
82
34
)
83
35
84
- def gapic_generator_register_toolchains ():
85
- native .register_toolchains (
86
- "@gapic_generator_python//:pandoc_toolchain_linux_arm_64" ,
87
- "@gapic_generator_python//:pandoc_toolchain_linux_x86_64" ,
88
- "@gapic_generator_python//:pandoc_toolchain_macOS_arm_64" ,
89
- "@gapic_generator_python//:pandoc_toolchain_macOS_x86_64" ,
90
- "@gapic_generator_python//:pandoc_toolchain_windows_x86_64" ,
91
- )
92
36
93
37
def _maybe (repo_rule , name , strip_repo_prefix = "" , ** kwargs ):
94
38
if not name .startswith (strip_repo_prefix ):
0 commit comments