When an user installs offlineimap from PyPI using pip, the dependencies
of offlineimap are not installed automatically. See #661.
Requiring explicitly the dependencies in the setup.py adds them in the
metadata of the package so pip can install them next with offlineimap.
To avoid duplicated dependencies, requirements.txt delegates to setup.py
the listing of the minimal dependencies while also adding two more
optional dependencies.
Signed-off-by: Martin Di Paola <martinp.dipaola@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
The setup.py uses the version, author and others attributes as metadata
for the python package.
The setup read them from offlineimap/__init__.py doing an import of the
module first.
Unfortunately the import also try to import all the dependencies of
offlineimap which may not be installed by the time. See #661.
Moving out the attributes in a separated module allows to be imported by
setup.py whitout needing to import the whole offlineimap.
The import of test.OLItest has the same limitation. In this case the
import was delayed until the real test case run is executed avoiding
again loading offlineimap from the begin.
Signed-off-by: Martin Di Paola <martinp.dipaola@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
We need to clean out the remote folders before we invoke the test suite.
Implement a helper function that does this, and improve the test output
(less verbose) and the setup.py --help-commands (more verbose). Document
that it is possible to run a single test only. (although it is not
guaranteed that a test does not rely on the output of previous tests).
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
1) Add helper functions to create and count maildirs and mails.
2) Add a second test that creates 2 maildirs, one of the including a
quotation sign " in its folder name and sync.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
"python setup.py test" will now run the complete test suite. Remove the
previous ./test command.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This fixes some leftover of 0b5b38d298.
Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Move central constant definitions into __init__.py. This does away
with version.py which contained nothing else and __init__.py is where
things like __VERSION__ are usually defined.
This commit also changes code to use offlineimap.__version__ rather
than offlineimap.version.__version__ as was before. Cleaned up some
duplicate or unneeded imports while touching those, formatting import
statements per PEP8 (one import per row).
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>