From 786f80fe6632902be74f90a577d75e8641494abd Mon Sep 17 00:00:00 2001 From: Silviu Calinoiu Date: Thu, 18 Feb 2016 16:12:11 -0800 Subject: Add a modified patch from craigcitro@ to handle namespace sharing. --- python/google/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/google/__init__.py') 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__) -- cgit v1.2.3