aboutsummaryrefslogtreecommitdiff
path: root/python/google
diff options
context:
space:
mode:
authorPete Warden <pete@petewarden.com>2016-03-09 13:05:15 -0800
committerPete Warden <pete@petewarden.com>2016-03-09 13:05:15 -0800
commitbc2d6c2504b38dda4345e9960948d96102daccc3 (patch)
tree48ad357a166b3bf9715a20714db8c117d8150c41 /python/google
parentf0c1a8637218a03a083901493c9b3acdb6e5db57 (diff)
parent48ebb29a8ec118bf6b9ee39f6be42b57321c099a (diff)
downloadprotobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.tar.gz
protobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.tar.bz2
protobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'python/google')
-rwxr-xr-xpython/google/__init__.py5
-rwxr-xr-xpython/google/protobuf/__init__.py8
-rw-r--r--python/google/protobuf/pyext/__init__.py4
3 files changed, 15 insertions, 2 deletions
diff --git a/python/google/__init__.py b/python/google/__init__.py
index de40ea7c..55856141 100755
--- a/python/google/__init__.py
+++ b/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__)
diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py
index 533821c1..fcb1734e 100755
--- a/python/google/protobuf/__init__.py
+++ b/python/google/protobuf/__init__.py
@@ -30,4 +30,10 @@
# Copyright 2007 Google Inc. All Rights Reserved.
-__version__ = '3.0.0b2'
+__version__ = '3.0.0b2.post2'
+
+if __name__ != '__main__':
+ try:
+ __import__('pkg_resources').declare_namespace(__name__)
+ except ImportError:
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/python/google/protobuf/pyext/__init__.py b/python/google/protobuf/pyext/__init__.py
index e69de29b..55856141 100644
--- a/python/google/protobuf/pyext/__init__.py
+++ b/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__)