bypass sphinx from CLI

Stone, Ronald Ronald.Stone at
Wed Feb 2 20:49:05 UTC 2022


The StarlingX docs team is implementing the default sphinxcontrib.spelling spelling extension for use from tox via a virtualenv set up for this purpose. We do not want sphinxcontrib.spelling loaded into other tox jobs that won't use it. This means that it cannot be loaded from the standard Instead I am bypassing and setting parameters from the sphinx-build command in the appropriate tox job:

sphinx-build -a -E -C --keep-going -d doc/build/doctrees -D extensions=sphinxcontrib.spelling -D spelling_word_list_filename=spelling_wordlist.txt -D rst_prolog="open('./shared/strings.txt', 'r').read()" -t starlingx -t openstack -b spelling doc/source doc/build/spelling {posargs}

This works except that we also need to load some strings into the rst prolog for various purposes, and that is failing without warning or errors. I can open the file from a python console. Sphinx-build escapes the single quotes as:

open('"'"'./shared/strings.txt'"'"', '"'"'r'"'"').read()'

Any suggestions on the correct parameter format appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the openstack-discuss mailing list