Skip to content

Commit

Permalink
Add a modified patch from craigcitro@ to handle namespace sharing.
Browse files Browse the repository at this point in the history
  • Loading branch information
silviulica committed Feb 19, 2016
1 parent c003abb commit 786f80f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion python/google/__init__.py
@@ -1 +1,4 @@
__import__('pkg_resources').declare_namespace(__name__)
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
6 changes: 6 additions & 0 deletions python/google/protobuf/__init__.py
Expand Up @@ -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__)
4 changes: 4 additions & 0 deletions python/google/protobuf/pyext/__init__.py
@@ -0,0 +1,4 @@
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 0 additions & 1 deletion python/setup.py
Expand Up @@ -210,7 +210,6 @@ def run(self):
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
],
namespace_packages=['google'],
packages=find_packages(
exclude=[
'import_test_package',
Expand Down

0 comments on commit 786f80f

Please sign in to comment.