File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141
4242
4343def _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
6667import matplotlib
You can’t perform that action at this time.
0 commit comments