Ticket #4317: LoaderAdditionalDirs.diff
| File LoaderAdditionalDirs.diff, 1.2 KB (added by ilias@…, 5 years ago) |
|---|
-
loader.py
31 31 32 32 __all__ = ['load_components'] 33 33 34 def load_components(env ):34 def load_components(env, further_dirs = None): 35 35 loaded_components = [] 36 36 plugins_dirs = [os.path.normcase(os.path.realpath(os.path.join(env.path, 37 37 'plugins'))), 38 38 default_dir('plugins')] 39 39 40 if further_dirs: 41 plugins_dirs.extend( further_dirs ) 42 40 43 # First look for Python source files in the plugins directories, which 41 44 # simply get imported, thereby registering them with the component manager 42 45 # if they define any components. … … 46 49 for plugin_file in plugin_files: 47 50 try: 48 51 plugin_name = os.path.basename(plugin_file[:-3]) 52 # do not process setup.py files 53 if plugin_name == 'setup': 54 continue 49 55 if plugin_name not in loaded_components: 50 56 env.log.debug('Loading file plugin %s from %s' % \ 51 57 (plugin_name, plugin_file))
