diff --git a/docs/conf.py b/docs/conf.py index 3647156..7ae6c00 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,6 +22,20 @@ sys.path.insert(0, os.path.abspath('..')) +class Mock(MagicMock): + """ + Required to get around having to install dependencies to build docs. + """ + @classmethod + def __getattr__(cls, name): + return Mock() + +MOCK_MODULES = ['numpy', + 'matplotlib', + 'matplotlib.pyplot', + 'matplotlib.patches'] +sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here.