| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,26 +41,27 @@ | |||
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | 43 | 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'} | ||
| 51 | 51 | if sys.version_info < (3, 3): | |
| 52 | - names.append("mock") | ||
| 52 | + names["mock"] = 'mock' | ||
| 53 | 53 | missing = [] | |
| 54 | 54 | for name in names: | |
| 55 | 55 | try: | |
| 56 | 56 | __import__(name) | |
| 57 | 57 | except ImportError: | |
| 58 | - missing.append(name) | ||
| 58 | + missing.append(names[name]) | ||
| 59 | 59 | if missing: | |
| 60 | 60 | raise ImportError( | |
| 61 | 61 | "The following dependencies are missing to build the " | |
| 62 | 62 | "documentation: {}".format(", ".join(missing))) | |
| 63 | 63 | ||
| 64 | + | ||
| 64 | 65 | _check_deps() | |
| 65 | 66 | ||
| 66 | 67 | import matplotlib | |
| Back | FazBrowse Home | New Git URL |
0 commit comments