From 8c5be7d12dc5e48faf4008209327d34c04961616 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Fri, 10 Feb 2012 18:52:19 +0100 Subject: python: Add a Mock class to the sphinx config that can be used to mock modules Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de> --- bindings/python/docs/source/conf.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'bindings/python/docs/source/conf.py') diff --git a/bindings/python/docs/source/conf.py b/bindings/python/docs/source/conf.py index e0ee39c..c7b9518 100644 --- a/bindings/python/docs/source/conf.py +++ b/bindings/python/docs/source/conf.py @@ -18,6 +18,23 @@ import sys, os # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0,os.path.abspath('../..')) +class Mock(object): + def __init__(self, *args, **kwargs): + pass + + def __call__(self, *args, **kwargs): + return Mock() + + @classmethod + def __getattr__(self, name): + return Mock() if name not in ('__file__', '__path__') else '/dev/null' + +MOCK_MODULES = [ +] +for mod_name in MOCK_MODULES: + sys.modules[mod_name] = Mock() + + from notmuch import __VERSION__,__AUTHOR__ # -- General configuration ----------------------------------------------------- -- cgit v1.2.3 From ae376c774ee8d8f45bae002261c425e1bc0a243a Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Fri, 10 Feb 2012 18:53:04 +0100 Subject: python: mock out the ctypes library This allows rtfd.org to build the documentation without libnotmuch. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de> --- bindings/python/docs/source/conf.py | 1 + 1 file changed, 1 insertion(+) (limited to 'bindings/python/docs/source/conf.py') diff --git a/bindings/python/docs/source/conf.py b/bindings/python/docs/source/conf.py index c7b9518..76610b7 100644 --- a/bindings/python/docs/source/conf.py +++ b/bindings/python/docs/source/conf.py @@ -30,6 +30,7 @@ class Mock(object): return Mock() if name not in ('__file__', '__path__') else '/dev/null' MOCK_MODULES = [ + 'ctypes', ] for mod_name in MOCK_MODULES: sys.modules[mod_name] = Mock() -- cgit v1.2.3 From 4bb9f59ff6da456392ffaf9871941203e4cf9b53 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Mon, 20 Feb 2012 21:48:35 +0100 Subject: python: fix the projects name and update years of the copyright notice in the sphinx docs Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de> --- bindings/python/docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bindings/python/docs/source/conf.py') diff --git a/bindings/python/docs/source/conf.py b/bindings/python/docs/source/conf.py index 76610b7..9db377f 100644 --- a/bindings/python/docs/source/conf.py +++ b/bindings/python/docs/source/conf.py @@ -57,8 +57,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'cnotmuch' -copyright = u'2010, ' + __AUTHOR__ +project = u'notmuch' +copyright = u'2010-2012, ' + __AUTHOR__ # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the -- cgit v1.2.3