Skip to content

Commit a6ce25a

Browse files
committed
address feedback
1 parent b5a8bd7 commit a6ce25a

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

packages/gapic-generator/WORKSPACE

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,8 @@ http_archive(
116116
sha256 = _grpc_sha256,
117117
strip_prefix = "grpc-{}".format(_grpc_version),
118118
urls = ["https://github.com/grpc/grpc/archive/v{}.zip".format(_grpc_version)],
119-
patch_cmds = [
120-
"python3 -c \"f='src/core/lib/surface/legacy_channel.cc'; c=open(f).read(); open(f,'w').write(c.replace('args.arena_init_function = arena_init_function;', 'if (arena_init_function.has_value()) { args.arena_init_function.emplace(*arena_init_function); }')) if 'args.arena_init_function = arena_init_function;' in c else None\""
121-
],
119+
patches = ["//third_party:grpc_legacy_channel.patch"],
120+
patch_args = ["-p1"],
122121
)
123122
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
124123
grpc_deps()

packages/gapic-generator/repositories.bzl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ def gapic_generator_python():
2727
sha256 = _grpc_sha256,
2828
strip_prefix = "grpc-{}".format(_grpc_version),
2929
url = "https://github.com/grpc/grpc/archive/v{}.zip".format(_grpc_version),
30-
patch_cmds = [
31-
"python3 -c \"f='src/core/lib/surface/legacy_channel.cc'; c=open(f).read(); open(f,'w').write(c.replace('args.arena_init_function = arena_init_function;', 'if (arena_init_function.has_value()) { args.arena_init_function.emplace(*arena_init_function); }')) if 'args.arena_init_function = arena_init_function;' in c else None\""
32-
],
30+
patches = ["@gapic_generator_python//third_party:grpc_legacy_channel.patch"],
31+
patch_args = ["-p1"],
3332
)
3433

3534
_maybe(

0 commit comments

Comments
 (0)