Update setuptools config and move startup method in jmc.runner

darcs-hash:20071106174551-86b55-f506637351cdbbb449faea24eaaadaa1856636f0.gz
This commit is contained in:
David Rousselie
2007-11-06 18:45:51 +01:00
parent 533c9e3625
commit 9b3b317917
3 changed files with 32 additions and 47 deletions

View File

@@ -1,36 +0,0 @@
##
## jmc.py
## Login : <dax@happycoders.org>
## Started on Fri Jan 19 18:14:41 2007 David Rousselie
## $Id$
##
## Copyright (C) 2007 David Rousselie
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
del sys.setdefaultencoding
import jmc
from jmc.runner import JMCRunner
from jmc.lang import Lang
if __name__ == "__main__":
runner = JMCRunner(Lang().get_default_lang_class().component_name,
jmc.version)
runner.configure()
runner.run()

View File

@@ -66,3 +66,18 @@ class JMCRunner(JCLRunner):
component.disco_identity.set_type("smtp")
return component.run()
self._run(run_func)
def main():
import jmc
import sys
from jmc.lang import Lang
reload(sys)
sys.setdefaultencoding('utf-8')
del sys.setdefaultencoding
runner = JMCRunner(Lang().get_default_lang_class().component_name,
jmc.version)
runner.configure()
runner.run()
if __name__ == "__main__":
main()