summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-03-14 13:27:55 -0300
committerdrebs <drebs@leap.se>2013-03-14 13:27:55 -0300
commit3fffd731552426c67d1255fd5ba3b4a36964efe4 (patch)
tree39fe2dff9dd6499cafe96d0b026f38065ff10e5f /src
parent163c0500a4a6fb9b11fe667fb7ee6d2822916cdb (diff)
Add support for setuptools with fallback.
Diffstat (limited to 'src')
-rw-r--r--src/leap/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/leap/__init__.py b/src/leap/__init__.py
index de40ea7c..f48ad105 100644
--- a/src/leap/__init__.py
+++ b/src/leap/__init__.py
@@ -1 +1,6 @@
-__import__('pkg_resources').declare_namespace(__name__)
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)