From: Menno Smits Date: Tue, 25 Aug 2015 06:13:06 +0000 (+1200) Subject: Fake out backports.ssl while building docs X-Git-Tag: 1.0.0~1^2~38 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=08629d9d4d431dc34bf2d8761351a8b8f37914af;p=imapclient.git Fake out backports.ssl while building docs ReadTheDocs doesn't have it on their build servers. --- diff --git a/doc/src/conf.py b/doc/src/conf.py index a50c1ca..f008281 100644 --- a/doc/src/conf.py +++ b/doc/src/conf.py @@ -5,9 +5,15 @@ import sys from os import path +from mock import MagicMock sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..', '..'))) +# Fake out backports(.ssl) so that it's not needed in order to build +# the docs (ReadTheDocs doesn't have backports.ssl installed). +MOCK_MODULES = ['backports'] +sys.modules.update((mod_name, MagicMock()) for mod_name in MOCK_MODULES) + import imapclient # -- General configuration ----------------------------------------------------- diff --git a/setup.py b/setup.py index 23e5430..5a8f6ea 100644 --- a/setup.py +++ b/setup.py @@ -65,11 +65,12 @@ main_deps = [ 'backports.ssl>=0.0.6', 'pyopenssl>=0.15.1', 'six', + 'mock==1.3.0' ] setup_deps = main_deps + ['sphinx'] -test_deps = ['mock==1.3.0'] +test_deps = [] if IS_PY_26_OR_OLDER: test_deps.append('unittest2')