From 51c212c57c83d41d89a342222bc41618c2094421 Mon Sep 17 00:00:00 2001 From: Justas Azna Date: Wed, 9 Jul 2014 18:24:05 +0200 Subject: [PATCH] Declare namespace in ckanext/googleanalytics/__init__.py --- ckanext/googleanalytics/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ckanext/googleanalytics/__init__.py b/ckanext/googleanalytics/__init__.py index 792d600..2e2033b 100644 --- a/ckanext/googleanalytics/__init__.py +++ b/ckanext/googleanalytics/__init__.py @@ -1 +1,7 @@ -# +# this is a namespace package +try: + import pkg_resources + pkg_resources.declare_namespace(__name__) +except ImportError: + import pkgutil + __path__ = pkgutil.extend_path(__path__, __name__)