diff options
author | drebs <drebs@leap.se> | 2013-03-14 13:27:55 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-03-14 13:27:55 -0300 |
commit | 3fffd731552426c67d1255fd5ba3b4a36964efe4 (patch) | |
tree | 39fe2dff9dd6499cafe96d0b026f38065ff10e5f | |
parent | 163c0500a4a6fb9b11fe667fb7ee6d2822916cdb (diff) |
Add support for setuptools with fallback.
-rw-r--r-- | src/leap/__init__.py | 7 |
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__) |