From bd632ff3096500649ebe4757670494259815a304 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 24 Feb 2022 11:42:01 +0100 Subject: [PATCH] Tweak dependency checking in doc/conf.py. - Autogen most of the checked list. - Replace outdated pydata_sphinx_theme entry. - matplotlib and its dependency pillow don't need to be explicitly listed, as we already import matplotlib at the top of the file anyways so if it's not importable, we won't even reach _check_dependencies. --- doc/conf.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index a3542e43050b..3f71ecc93cae 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -89,14 +89,11 @@ def _check_dependencies(): names = { + **{ext: ext.split(".")[0] for ext in extensions}, + # Explicitly list deps that are not extensions, or whose PyPI package + # name does not match the (toplevel) module name. "colorspacious": 'colorspacious', - "IPython.sphinxext.ipython_console_highlighting": 'ipython', - "matplotlib": 'matplotlib', - "numpydoc": 'numpydoc', - "PIL.Image": 'pillow', - "pydata_sphinx_theme": 'pydata_sphinx_theme', - "sphinx_copybutton": 'sphinx_copybutton', - "sphinx_gallery": 'sphinx_gallery', + "mpl_sphinx_theme": 'mpl_sphinx_theme', "sphinxcontrib.inkscapeconverter": 'sphinxcontrib-svg2pdfconverter', } missing = []