Add patch to protobuf

pull/25171/head
Richard Belleville 4 years ago
parent 0cdbad935d
commit 99d20dfab3
  1. 2
      bazel/grpc_deps.bzl
  2. 14
      third_party/protobuf.patch

@ -175,6 +175,8 @@ def grpc_deps():
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/protobuf/archive/19fb89416f3fdc2d6668f3738f444885575285bc.tar.gz",
"https://github.com/google/protobuf/archive/19fb89416f3fdc2d6668f3738f444885575285bc.tar.gz",
],
patches = ["//third_party:protobuf.patch"],
patch_args = ["-p1"],
)
if "com_google_googletest" not in native.existing_rules():

@ -0,0 +1,14 @@
diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py
index 97ac28028..8b7585d9d 100644
--- a/python/google/protobuf/__init__.py
+++ b/python/google/protobuf/__init__.py
@@ -31,3 +31,9 @@
# Copyright 2007 Google Inc. All Rights Reserved.
__version__ = '3.14.0'
+
+if __name__ != '__main__':
+ try:
+ __import__('pkg_resources').declare_namespace(__name__)
+ except ImportError:
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
Loading…
Cancel
Save