From cb94229126befe19e531b527348d26404808fc1c Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 11 Oct 2017 21:25:12 +0100 Subject: [PATCH 1/2] Print specific packages that need to be installed to build docs if missing --- doc/conf.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 987142628704..c7348f270885 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -41,13 +41,13 @@ 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 = [] @@ -55,12 +55,13 @@ def _check_deps(): 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 From 5fa465e4b0922b0f7f51efa7d6099a34906d5039 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Wed, 11 Oct 2017 22:19:16 -0700 Subject: [PATCH 2/2] Fixed names.append('mock') --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index c7348f270885..51a8c58249cd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -49,7 +49,7 @@ def _check_deps(): "scipy": 'scipy', "sphinx_gallery": 'sphinx_gallery'} if sys.version_info < (3, 3): - names.append("mock") + names["mock"] = 'mock' missing = [] for name in names: try: