diff --git a/doc/conf.py b/doc/conf.py index cc8a1754d9c0..cd168bcfb494 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -51,13 +51,16 @@ exclude_patterns = ['api/api_changes/*', 'users/whats_new/*'] -def _check_deps(): - names = {"colorspacious": 'colorspacious', - "IPython.sphinxext.ipython_console_highlighting": 'ipython', - "matplotlib": 'matplotlib', - "numpydoc": 'numpydoc', - "PIL.Image": 'pillow', - "sphinx_gallery": 'sphinx_gallery'} +def _check_dependencies(): + names = { + "colorspacious": 'colorspacious', + "IPython.sphinxext.ipython_console_highlighting": 'ipython', + "matplotlib": 'matplotlib', + "numpydoc": 'numpydoc', + "PIL.Image": 'pillow', + "sphinx_copybutton": 'sphinx_copybutton', + "sphinx_gallery": 'sphinx_gallery', + } missing = [] for name in names: try: @@ -69,7 +72,8 @@ def _check_deps(): "The following dependencies are missing to build the " "documentation: {}".format(", ".join(missing))) -_check_deps() +_check_dependencies() + # Import only after checking for dependencies. # gallery_order.py from the sphinxext folder provides the classes that