Skip to content

Commit a0578c0

Browse files
committed
mock out external libs when buildings docs
1 parent 111116e commit a0578c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
import os
1818
import shlex
1919

20+
import mock
21+
22+
MOCK_MODULES = ['numpy', 'scipy', 'matplotlib', 'matplotlib.pyplot', 'scipy.stats']
23+
for mod_name in MOCK_MODULES:
24+
sys.modules[mod_name] = mock.Mock()
25+
2026
# If extensions (or modules to document with autodoc) are in another directory,
2127
# add these directories to sys.path here. If the directory is relative to the
2228
# documentation root, use os.path.abspath to make it absolute, like shown here.

0 commit comments

Comments
 (0)