11load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
22
3- _PANDOC_BUILD_FILE = """
4- filegroup(
5- name = "pandoc",
6- srcs = ["bin/pandoc"],
7- visibility = ["//visibility:public"],
8- )"""
9-
103def gapic_generator_python ():
114
125 _maybe (
@@ -25,47 +18,6 @@ def gapic_generator_python():
2518 strip_prefix = "grpc-{}" .format (_grpc_version ),
2619 url = "https://github.com/grpc/grpc/archive/v{}.zip" .format (_grpc_version ),
2720 )
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-
6921 _rules_gapic_version = "0.5.4"
7022 _maybe (
7123 http_archive ,
@@ -81,14 +33,6 @@ def gapic_generator_python():
8133 urls = ["https://github.com/googleapis/googleapis/archive/{}.zip" .format (_commit_sha )],
8234 )
8335
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- )
9236
9337def _maybe (repo_rule , name , strip_repo_prefix = "" , ** kwargs ):
9438 if not name .startswith (strip_repo_prefix ):
0 commit comments