summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-03-14 10:04:24 +0900
committerKali Kaneko <kali@leap.se>2013-03-14 10:04:24 +0900
commit146ee0ff24a847ec985f853d07bba25b472e7e84 (patch)
tree0195c1ac876eac1934bf248da8daf2ab1be75787
parent69ad8cf586784d9a2aa8f99f621bc13ca5a35e3f (diff)
add support for setuptools
-rw-r--r--src/leap/__init__.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/leap/__init__.py b/src/leap/__init__.py
index 3ad9513..f48ad10 100644
--- a/src/leap/__init__.py
+++ b/src/leap/__init__.py
@@ -1,2 +1,6 @@
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __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__)