protobuf.patch 487 B

1234567891011121314
  1. diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py
  2. index 97ac28028..8b7585d9d 100644
  3. --- a/python/google/protobuf/__init__.py
  4. +++ b/python/google/protobuf/__init__.py
  5. @@ -31,3 +31,9 @@
  6. # Copyright 2007 Google Inc. All Rights Reserved.
  7. __version__ = '3.19.4'
  8. +
  9. +if __name__ != '__main__':
  10. + try:
  11. + __import__('pkg_resources').declare_namespace(__name__)
  12. + except ImportError:
  13. + __path__ = __import__('pkgutil').extend_path(__path__, __name__)