From c73d708616767e7bd141d8ffd9ef3ce94f8597e9 Mon Sep 17 00:00:00 2001 From: ianb Date: Sun, 17 Jul 2005 22:45:38 +0000 Subject: Forgot that we put in builders, not actual functions --- paste/pyconfig.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'paste') diff --git a/paste/pyconfig.py b/paste/pyconfig.py index a77725d..f3e254e 100644 --- a/paste/pyconfig.py +++ b/paste/pyconfig.py @@ -24,6 +24,11 @@ UserDict = thirdparty.load_new_module('UserDict', (2, 3)) from paste.reloader import watch_file from paste.util.threadinglocal import local import threading +try: + import pkg_resources + require = pkg_resources.require +except ImportError: + require = None def load(filename): conf = Config(with_default=True) @@ -178,6 +183,11 @@ class Config(UserDict.DictMixin, object): def update_sys_path(self): update_sys_path(self.get('sys_path'), self.get('verbose')) +if require: + def make_require(config, filename, namespace): + return require + Config.builtins['require'] = make_require + def setup_config(filename, add_config=None, conf=None): """ Load the configuration with all default configs also applied, -- cgit v1.2.1