# HG changeset patch # User Goffi # Date 1294191575 -3600 # Node ID d8bb72f00eec15a495ceabeb0522670a736fc72f # Parent fd9b7834d98a674ba77c1242fa21d65a7e86e7bb distutils install: fixed plugin import and log file path diff -r fd9b7834d98a -r d8bb72f00eec frontends/src/__init__.py diff -r fd9b7834d98a -r d8bb72f00eec src/sat.sh --- a/src/sat.sh Wed Jan 05 01:56:36 2011 +0100 +++ b/src/sat.sh Wed Jan 05 02:39:35 2011 +0100 @@ -3,6 +3,7 @@ NAME='sat' PID_FILE="/tmp/$NAME.pid" +LOG_FILE=~/".$NAME/$NAME.log" DAEMON="n" MAIN_OPTIONS="-${DAEMON}oy" TAP_PATH="./" @@ -10,7 +11,11 @@ #Don't change the next line AUTO_OPTIONS="" -ADDITIONAL_OPTIONS="--pidfile $PID_FILE $AUTO_OPTIONS" +ADDITIONAL_OPTIONS="--pidfile $PID_FILE --logfile $LOG_FILE $AUTO_OPTIONS" -echo "autogenere == >" twistd $MAIN_OPTIONS $TAP_PATH$TAP_FILE $ADDITIONAL_OPTIONS +log_dir=`dirname "$LOG_FILE"` +if [ ! -d $log_dir ] ; then + mkdir $log_dir +fi + twistd $MAIN_OPTIONS $TAP_PATH$TAP_FILE $ADDITIONAL_OPTIONS diff -r fd9b7834d98a -r d8bb72f00eec src/sat.tac --- a/src/sat.tac Wed Jan 05 01:56:36 2011 +0100 +++ b/src/sat.tac Wed Jan 05 02:39:35 2011 +0100 @@ -369,7 +369,9 @@ def _import_plugins(self): """Import all plugins found in plugins directory""" #TODO: manage dependencies - plug_lst = [os.path.splitext(plugin)[0] for plugin in map(os.path.basename,glob ("plugins/plugin*.py"))] + import sat.plugins + plugins_path = os.path.dirname(sat.plugins.__file__) + plug_lst = [os.path.splitext(plugin)[0] for plugin in map(os.path.basename,glob (os.path.join(plugins_path,"plugin*.py")))] for plug in plug_lst: plug_path = 'sat.plugins.'+plug