2006-11-30 10:50:48 +01:00
|
|
|
#!/usr/bin/env python
|
2002-06-22 06:10:49 +02:00
|
|
|
|
|
|
|
# $Id: setup.py,v 1.1 2002/06/21 18:10:49 jgoerzen Exp $
|
|
|
|
|
|
|
|
# IMAP synchronization
|
|
|
|
# Module: installer
|
|
|
|
# COPYRIGHT #
|
2018-05-01 03:48:26 +02:00
|
|
|
# Copyright (C) 2002 - 2018 John Goerzen & contributors
|
2002-06-22 06:10:49 +02:00
|
|
|
#
|
|
|
|
# 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
|
2003-04-16 21:23:45 +02:00
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
2002-06-22 06:10:49 +02:00
|
|
|
#
|
|
|
|
# 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
|
2019-04-06 23:05:14 +02:00
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2002-06-22 06:10:49 +02:00
|
|
|
|
2012-01-18 22:41:05 +01:00
|
|
|
from distutils.core import setup, Command
|
2011-01-25 12:22:26 +01:00
|
|
|
import offlineimap
|
2012-01-18 22:41:05 +01:00
|
|
|
import logging
|
2012-01-20 15:55:44 +01:00
|
|
|
from test.OLItest import TextTestRunner, TestLoader, OLITestLib
|
2012-01-18 22:41:05 +01:00
|
|
|
|
|
|
|
class TestCommand(Command):
|
|
|
|
"""runs the OLI testsuite"""
|
2012-02-17 10:12:53 +01:00
|
|
|
description = """Runs the test suite. In order to execute only a single
|
|
|
|
test, you could also issue e.g. 'python -m unittest
|
|
|
|
test.tests.test_01_basic.TestBasicFunctions.test_01_olistartup' on the
|
|
|
|
command line."""
|
2012-01-18 22:41:05 +01:00
|
|
|
user_options = []
|
|
|
|
|
|
|
|
def initialize_options(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def finalize_options(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
logging.basicConfig(format='%(message)s')
|
|
|
|
# set credentials and OfflineImap command to be executed:
|
|
|
|
OLITestLib(cred_file='./test/credentials.conf', cmd='./offlineimap.py')
|
|
|
|
suite = TestLoader().discover('./test/tests')
|
|
|
|
#TODO: failfast does not seem to exist in python2.6?
|
2012-01-20 15:55:44 +01:00
|
|
|
TextTestRunner(verbosity=2,failfast=True).run(suite)
|
2012-01-18 22:41:05 +01:00
|
|
|
|
2002-06-22 06:10:49 +02:00
|
|
|
|
|
|
|
setup(name = "offlineimap",
|
2010-12-22 12:35:41 +01:00
|
|
|
version = offlineimap.__version__,
|
|
|
|
description = offlineimap.__description__,
|
2018-05-01 03:48:26 +02:00
|
|
|
long_description = offlineimap.__description__,
|
2010-12-22 12:35:41 +01:00
|
|
|
author = offlineimap.__author__,
|
|
|
|
author_email = offlineimap.__author_email__,
|
|
|
|
url = offlineimap.__homepage__,
|
2002-06-22 06:10:49 +02:00
|
|
|
packages = ['offlineimap', 'offlineimap.folder',
|
2013-02-05 04:38:11 +01:00
|
|
|
'offlineimap.repository', 'offlineimap.ui',
|
|
|
|
'offlineimap.utils'],
|
2002-08-24 03:55:20 +02:00
|
|
|
scripts = ['bin/offlineimap'],
|
2010-12-22 12:35:41 +01:00
|
|
|
license = offlineimap.__copyright__ + \
|
2012-01-18 22:41:05 +01:00
|
|
|
", Licensed under the GPL version 2",
|
|
|
|
cmdclass = { 'test': TestCommand}
|
2002-06-22 06:10:49 +02:00
|
|
|
)
|
|
|
|
|