comparison src/sat.tac @ 226:d8bb72f00eec

distutils install: fixed plugin import and log file path
author Goffi <goffi@goffi.org>
date Wed, 05 Jan 2011 02:39:35 +0100
parents fd9b7834d98a
children b1794cbb88e5
comparison
equal deleted inserted replaced
225:fd9b7834d98a 226:d8bb72f00eec
367 367
368 368
369 def _import_plugins(self): 369 def _import_plugins(self):
370 """Import all plugins found in plugins directory""" 370 """Import all plugins found in plugins directory"""
371 #TODO: manage dependencies 371 #TODO: manage dependencies
372 plug_lst = [os.path.splitext(plugin)[0] for plugin in map(os.path.basename,glob ("plugins/plugin*.py"))] 372 import sat.plugins
373 plugins_path = os.path.dirname(sat.plugins.__file__)
374 plug_lst = [os.path.splitext(plugin)[0] for plugin in map(os.path.basename,glob (os.path.join(plugins_path,"plugin*.py")))]
373 375
374 for plug in plug_lst: 376 for plug in plug_lst:
375 plug_path = 'sat.plugins.'+plug 377 plug_path = 'sat.plugins.'+plug
376 __import__(plug_path) 378 __import__(plug_path)
377 mod = sys.modules[plug_path] 379 mod = sys.modules[plug_path]