Add a modified patch from craigcitro@ to handle namespace sharing.

pull/1259/head
Silviu Calinoiu 9 years ago
parent c003abb40d
commit 786f80fe66
  1. 5
      python/google/__init__.py
  2. 6
      python/google/protobuf/__init__.py
  3. 4
      python/google/protobuf/pyext/__init__.py
  4. 1
      python/setup.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__)

@ -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__)

@ -0,0 +1,4 @@
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

@ -210,7 +210,6 @@ if __name__ == '__main__':
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
],
namespace_packages=['google'],
packages=find_packages(
exclude=[
'import_test_package',

Loading…
Cancel
Save