From ef40735a819df29be7a2cdd39c4d2c2d480283fd Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 21 Mar 2023 13:30:57 -0400 Subject: build(docs): only load sphinxcontrib.spelling if we are spell-checking #1593 --- doc/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 59907127..92eb9799 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -36,7 +36,6 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.ifconfig', - 'sphinxcontrib.spelling', 'sphinx.ext.intersphinx', 'sphinxcontrib.restbuilder', 'sphinx.ext.napoleon', @@ -220,6 +219,9 @@ htmlhelp_basename = 'coveragepydoc' # -- Spelling --- if any("spell" in arg for arg in sys.argv): + # sphinxcontrib.spelling needs the native "enchant" library, which often is + # missing, so only use the extension if we are specifically spell-checking. + extensions += ['sphinxcontrib.spelling'] names_file = tempfile.NamedTemporaryFile(mode='w', prefix="coverage_names_", suffix=".txt") with open("../CONTRIBUTORS.txt") as contributors: names = set(re.split(r"[^\w']", contributors.read())) -- cgit v1.2.1