From c13e0135a7d65714d0d54e095c6afa1935dddd4d Mon Sep 17 00:00:00 2001 From: Martin Di Paola Date: Sat, 18 Apr 2020 19:13:43 +0000 Subject: [PATCH] Require the minimal dependencies in python package 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 Signed-off-by: Nicolas Sebrecht --- requirements.txt | 6 +++--- setup.py | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 1e2a2ae..9e0b5f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -# Requirements -six +# Minimal requirements defined in setup.py +-e . +# Extra "optional" requirements gssapi[kerberos] portalocker[cygwin] -rfc6555 diff --git a/setup.py b/setup.py index 9080410..30be722 100644 --- a/setup.py +++ b/setup.py @@ -58,6 +58,11 @@ class TestCommand(Command): #TODO: failfast does not seem to exist in python2.6? TextTestRunner(verbosity=2,failfast=True).run(suite) +reqs = [ + 'six', + 'rfc6555' + ] + setup(name = "offlineimap", version = __version__, description = __description__, @@ -71,6 +76,7 @@ setup(name = "offlineimap", scripts = ['bin/offlineimap'], license = __copyright__ + \ ", Licensed under the GPL version 2", - cmdclass = { 'test': TestCommand} + cmdclass = { 'test': TestCommand}, + install_requires = reqs )