diff --git a/doc/conf.py b/doc/conf.py index 5d66ef236..52d32f2b9 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -15,6 +15,16 @@ import sys import os, subprocess import shlex +from mock import Mock as MagicMock + +# mock out some of the modules to make docomentation easier +class Mock(MagicMock): + @classmethod + def __getattr__(cls, name): + return Mock() + +MOCK_MODULES = ['pygtk', 'gtk', 'gobject', 'argparse', 'numpy', 'pandas'] +sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # 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