Index: loader.py
===================================================================
--- loader.py	(revision 152)
+++ loader.py	(working copy)
@@ -31,12 +31,16 @@
 
 __all__ = ['load_components']
 
-def load_components(env):
+def load_components(env, search_dirs = None):
     loaded_components = []
     plugins_dirs = [os.path.normcase(os.path.realpath(os.path.join(env.path,
                                                                   'plugins'))),
                     default_dir('plugins')]
 
+    if search_dirs:
+        plugins_dirs = search_dirs
+        env.log.debug('load_components from alternate search_dirs')
+
     # First look for Python source files in the plugins directories, which
     # simply get imported, thereby registering them with the component manager
     # if they define any components.
@@ -46,6 +50,9 @@
         for plugin_file in plugin_files:
             try:
                 plugin_name = os.path.basename(plugin_file[:-3])
+                # do not process setup.py files
+                if plugin_name == 'setup':
+                    continue
                 if plugin_name not in loaded_components:
                     env.log.debug('Loading file plugin %s from %s' % \
                                   (plugin_name, plugin_file))

