Update setuptools config and move startup method in jmc.runner
darcs-hash:20071106174551-86b55-f506637351cdbbb449faea24eaaadaa1856636f0.gz
This commit is contained in:
28
setup.py
28
setup.py
@@ -20,15 +20,21 @@
|
|||||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##
|
##
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(name = 'jmc', \
|
setup(name='jmc',
|
||||||
version = '0.3', \
|
version='0.3',
|
||||||
description = 'Jabber Mail Component', \
|
description='Jabber Mail Component',
|
||||||
author = 'David Rousselie', \
|
author='David Rousselie',
|
||||||
author_email = 'dax@happycoders.org', \
|
author_email='dax@happycoders.org',
|
||||||
url = 'http://people.happycoders.org/dax/projects/jmc', \
|
license="GPL",
|
||||||
package_dir = {'': 'src'}, \
|
keywords="jabber component email IMAP POP3 SMTP",
|
||||||
packages = ['jmc', 'jmc.jabber', 'jmc.model'], \
|
url='http://people.happycoders.org/dax/projects/jmc',
|
||||||
scripts = ['src/jmc.py'], \
|
package_dir={'': 'src'},
|
||||||
test_suite = 'jmc.tests.suite')
|
packages=find_packages('src', exclude=["*.tests",
|
||||||
|
"*.tests.*",
|
||||||
|
"tests.*",
|
||||||
|
"tests"]),
|
||||||
|
entry_points={'console_scripts': ['jmc=jmc.runner:main']},
|
||||||
|
test_suite='jmc.tests.suite')
|
||||||
|
# data_files=[("etc/jabber", "conf/jmc.conf")],
|
||||||
|
|||||||
36
src/jmc.py
36
src/jmc.py
@@ -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()
|
|
||||||
@@ -66,3 +66,18 @@ class JMCRunner(JCLRunner):
|
|||||||
component.disco_identity.set_type("smtp")
|
component.disco_identity.set_type("smtp")
|
||||||
return component.run()
|
return component.run()
|
||||||
self._run(run_func)
|
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()
|
||||||
|
|||||||
Reference in New Issue
Block a user