diff options
author | Silviu Calinoiu <silviuc@google.com> | 2016-02-18 16:12:11 -0800 |
---|---|---|
committer | Silviu Calinoiu <silviuc@google.com> | 2016-02-18 16:12:11 -0800 |
commit | 786f80fe6632902be74f90a577d75e8641494abd (patch) | |
tree | c6c2f9a3c5a87cb452bbbb98495d3fa16faec0ff /python/google/protobuf/__init__.py | |
parent | c003abb40d64ecd6694fab239d3fc126b31eee0d (diff) |
Add a modified patch from craigcitro@ to handle namespace sharing.
Diffstat (limited to 'python/google/protobuf/__init__.py')
-rwxr-xr-x | python/google/protobuf/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py index 533821c1..5d244191 100755 --- 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.0.0b2' + +if __name__ != '__main__': + try: + __import__('pkg_resources').declare_namespace(__name__) + except ImportError: + __path__ = __import__('pkgutil').extend_path(__path__, __name__) |