Thanks to visit codestin.com
Credit goes to github.com

Skip to content

If PIL.image is missing, tell user to install pillow #9365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 13, 2017
Merged
Changes from 1 commit
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
Next Next commit
Print specific packages that need to be installed to build docs if mi…
…ssing
  • Loading branch information
dstansby committed Oct 11, 2017
commit cb94229126befe19e531b527348d26404808fc1c
17 changes: 9 additions & 8 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")
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