diff options
author | ianb <ianb@localhost> | 2006-11-06 19:17:22 +0000 |
---|---|---|
committer | ianb <ianb@localhost> | 2006-11-06 19:17:22 +0000 |
commit | bafbac278384b5b17697886c32118a92e80677d5 (patch) | |
tree | 481cea7e13ebdf90f29f097d285640e80111bdd2 | |
parent | 6cdcd4075ddb27b8c79317c8c4b0337915f4615d (diff) | |
download | pastedeploy-git-bafbac278384b5b17697886c32118a92e80677d5.tar.gz |
modulefinder change
-rw-r--r-- | paste/__init__.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/paste/__init__.py b/paste/__init__.py index ece379c..e46fb43 100644 --- a/paste/__init__.py +++ b/paste/__init__.py @@ -1,2 +1,14 @@ -import pkg_resources -pkg_resources.declare_namespace(__name__) +# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) +# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php +try: + import pkg_resources + pkg_resources.declare_namespace(__name__) +except ImportError: + # don't prevent use of paste if pkg_resources isn't installed + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) + +import modulefinder +for p in __path__: + modulefinder.AddPackagePath(__name__, p) + |