diff --git a/doc/source/conf.py b/doc/source/conf.py index 97081bec863b77..71d0771a4a1177 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -73,13 +73,18 @@ 'sphinx.ext.ifconfig', 'sphinx.ext.linkcode', 'nbsphinx', - 'sphinxcontrib.spelling' ] exclude_patterns = ['**.ipynb_checkpoints'] -spelling_word_list_filename = ['spelling_wordlist.txt', 'names_wordlist.txt'] -spelling_ignore_pypi_package_names = True +# Tries to import sphixcontrib.spelling - if not available pass +try: + import sphinxcontrib.spelling + extensions.append('sphinxcontrib.spelling') + spelling_word_list_filename = ['spelling_wordlist.txt', 'names_wordlist.txt'] + spelling_ignore_pypi_package_names = True +except ModuleNotFoundError: + pass with open("index.rst") as f: index_rst_lines = f.readlines()