@@ -2,14 +2,14 @@ workspace(name = "gapic_generator_python")
22
33load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
44
5- _bazel_skylib_version = "0.9 .0"
5+ _bazel_skylib_version = "1.4 .0"
66
7- _bazel_skylib_sha256 = "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0 "
7+ _bazel_skylib_sha256 = "f24ab666394232f834f74d19e2ff142b0af17466ea0c69a3f4c276ee75f6efce "
88
99http_archive (
1010 name = "bazel_skylib" ,
1111 sha256 = _bazel_skylib_sha256 ,
12- url = "https://github.com/bazelbuild/bazel-skylib/releases/download/{0}/bazel_skylib -{0}.tar.gz" .format (_bazel_skylib_version ),
12+ url = "https://github.com/bazelbuild/bazel-skylib/releases/download/{0}/bazel-skylib -{0}.tar.gz" .format (_bazel_skylib_version ),
1313)
1414
1515_io_bazel_rules_go_version = "0.33.0"
@@ -59,10 +59,6 @@ gapic_generator_python()
5959
6060gapic_generator_register_toolchains ()
6161
62- load ("@com_google_protobuf//:protobuf_deps.bzl" , "protobuf_deps" )
63-
64- protobuf_deps ()
65-
6662# TODO(https://github.com/googleapis/gapic-generator-python/issues/1781):
6763# Remove this import once gRPC depends on a newer version.
6864#
@@ -81,16 +77,36 @@ http_archive(
8177 ],
8278)
8379
84- #
85- # Import grpc as a native bazel dependency. This avoids duplication and also
86- # speeds up loading phase a lot (otherwise python_rules will be building grpcio
87- # from sources in a single-core speed, which takes around 5 minutes on a regular
88- # workstation)
89- #
80+ _grpc_version = "1.55.1"
81+
82+ _grpc_sha256 = "17c0685da231917a7b3be2671a7b13b550a85fdda5e475313264c5f51c4da3f8"
83+
84+ http_archive (
85+ name = "com_github_grpc_grpc" ,
86+ sha256 = _grpc_sha256 ,
87+ strip_prefix = "grpc-%s" % _grpc_version ,
88+ urls = ["https://github.com/grpc/grpc/archive/v%s.zip" % _grpc_version ],
89+ )
90+ # instantiated in grpc_deps().
91+ http_archive (
92+ name = "com_google_protobuf" ,
93+ sha256 = "0b0395d34e000f1229679e10d984ed7913078f3dd7f26cf0476467f5e65716f4" ,
94+ strip_prefix = "protobuf-23.2" ,
95+ urls = ["https://github.com/protocolbuffers/protobuf/archive/v23.2.tar.gz" ],
96+ )
9097load ("@com_github_grpc_grpc//bazel:grpc_deps.bzl" , "grpc_deps" )
9198
9299grpc_deps ()
93100
101+ load ("@com_google_protobuf//:protobuf_deps.bzl" , "protobuf_deps" , "PROTOBUF_MAVEN_ARTIFACTS" )
102+ # This is actually already done within grpc_deps but calling this for Bazel convention.
103+ protobuf_deps ()
104+
105+ # gRPC enforces a specific version of Go toolchain which conflicts with our build.
106+ # All the relevant parts of grpc_extra_deps() are imported in this WORKSPACE file
107+ # explicitly, that is why we do not call grpc_extra_deps() here and call
108+ # apple_rules_dependencies and apple_support_dependencies macros explicitly.
109+
94110load ("@build_bazel_rules_apple//apple:repositories.bzl" , "apple_rules_dependencies" )
95111
96112apple_rules_dependencies ()
0 commit comments