diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-03-21 13:30:57 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-03-21 13:30:57 -0400 |
commit | ef40735a819df29be7a2cdd39c4d2c2d480283fd (patch) | |
tree | a0f0c2c2e28bac7e72ed73bd7e0a41085a6dfade | |
parent | eaa3c8adf13d3cfa0e83a6230b445a6ac54109de (diff) | |
download | python-coveragepy-git-ef40735a819df29be7a2cdd39c4d2c2d480283fd.tar.gz |
build(docs): only load sphinxcontrib.spelling if we are spell-checking #1593
-rw-r--r-- | doc/conf.py | 4 |
1 files changed, 3 insertions, 1 deletions
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())) |