Skip to content

Commit ef40735

Browse files
committed
build(docs): only load sphinxcontrib.spelling if we are spell-checking #1593
1 parent eaa3c8a commit ef40735

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
'sphinx.ext.autodoc',
3737
'sphinx.ext.todo',
3838
'sphinx.ext.ifconfig',
39-
'sphinxcontrib.spelling',
4039
'sphinx.ext.intersphinx',
4140
'sphinxcontrib.restbuilder',
4241
'sphinx.ext.napoleon',
@@ -220,6 +219,9 @@
220219
# -- Spelling ---
221220

222221
if any("spell" in arg for arg in sys.argv):
222+
# sphinxcontrib.spelling needs the native "enchant" library, which often is
223+
# missing, so only use the extension if we are specifically spell-checking.
224+
extensions += ['sphinxcontrib.spelling']
223225
names_file = tempfile.NamedTemporaryFile(mode='w', prefix="coverage_names_", suffix=".txt")
224226
with open("../CONTRIBUTORS.txt") as contributors:
225227
names = set(re.split(r"[^\w']", contributors.read()))

0 commit comments

Comments
 (0)