summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-12-03 18:24:28 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2011-12-03 18:24:28 +0000
commit5954bfa797e1de055ce74cd9878f3245c634c4d6 (patch)
tree79041a378e6bdbaef0724cca6f0ca0ab6289050d /docs
parent0a35a2bf8c49b08ae97bcfdeb66384b979c35a46 (diff)
readthedocs.org build hack
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 349d4af6..f3de5d4c 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -13,6 +13,27 @@
import sys, os
+###############################
+# readthedocs.org hack,
+# needed to use autodocs on their build-servers:
+# http://readthedocs.org/docs/read-the-docs/en/latest/faq.html?highlight=autodocs#where-do-i-need-to-put-my-docs-for-rtd-to-find-it
+
+class Mock(object):
+ def __init__(self, *args, **kwargs):
+ pass
+
+ def __getattr__(self, name):
+ return Mock
+
+MOCK_MODULES = ['notmuch', 'notmuch.globals',
+ 'twisted', 'twisted.internet',
+ 'urwid', 'argparse']
+for mod_name in MOCK_MODULES:
+ sys.modules[mod_name] = Mock()
+
+# end of readthedocs.org hack
+##############################
+
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.