Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,27 @@


def _check_deps():
names = ["colorspacious",
"IPython.sphinxext.ipython_console_highlighting",
"matplotlib",
"numpydoc",
"PIL.Image",
"scipy",
"sphinx_gallery"]
names = {"colorspacious": 'colorspacious',
"IPython.sphinxext.ipython_console_highlighting": 'ipython',
"matplotlib": 'matplotlib',
"numpydoc": 'numpydoc',
"PIL.Image": 'pillow',
"scipy": 'scipy',
"sphinx_gallery": 'sphinx_gallery'}
if sys.version_info < (3, 3):
names.append("mock")
names["mock"] = 'mock'
missing = []
for name in names:
try:
__import__(name)
except ImportError:
missing.append(name)
missing.append(names[name])
if missing:
raise ImportError(
"The following dependencies are missing to build the "
"documentation: {}".format(", ".join(missing)))


_check_deps()

import matplotlib
Expand Down