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

Skip to content

Commit bcf269e

Browse files
authored
Merge pull request #9365 from dstansby/doc-build-reqs
DOC: If PIL.image is missing, tell user to install pillow
2 parents 2f63513 + 5fa465e commit bcf269e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

doc/conf.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,27 @@
4141

4242

4343
def _check_deps():
44-
names = ["colorspacious",
45-
"IPython.sphinxext.ipython_console_highlighting",
46-
"matplotlib",
47-
"numpydoc",
48-
"PIL.Image",
49-
"scipy",
50-
"sphinx_gallery"]
44+
names = {"colorspacious": 'colorspacious',
45+
"IPython.sphinxext.ipython_console_highlighting": 'ipython',
46+
"matplotlib": 'matplotlib',
47+
"numpydoc": 'numpydoc',
48+
"PIL.Image": 'pillow',
49+
"scipy": 'scipy',
50+
"sphinx_gallery": 'sphinx_gallery'}
5151
if sys.version_info < (3, 3):
52-
names.append("mock")
52+
names["mock"] = 'mock'
5353
missing = []
5454
for name in names:
5555
try:
5656
__import__(name)
5757
except ImportError:
58-
missing.append(name)
58+
missing.append(names[name])
5959
if missing:
6060
raise ImportError(
6161
"The following dependencies are missing to build the "
6262
"documentation: {}".format(", ".join(missing)))
6363

64+
6465
_check_deps()
6566

6667
import matplotlib

0 commit comments

Comments
 (0)