On 5/14/20 6:40 AM, Peter Maydell wrote: > On Wed, 13 May 2020 at 22:52, John Snow <[email protected]> wrote: > >> +# We require the python3 version of sphinx, but sphinx-build-3 is a >> +# distro package. prefer 'sphinx-build' to find the venv version, if >> +# any, but ensure it is a suitable version. >> sphinx_build= >> -for binary in sphinx-build-3 sphinx-build >> +sphinx_ok= >> +for binary in sphinx-build sphinx-build-3 >> do >> if has "$binary" >> then >> - sphinx_build=$(command -v "$binary") >> - break >> + sphinx_candidate=$(command -v "$binary") >> + if test_sphinx_build "$sphinx_candidate" >> + then >> + sphinx_build=$sphinx_candidate >> + sphinx_ok=yes >> + break >> + fi >> fi >> done > > Here we look for a sphinx binary that works, and if > we find one then we set sphinx_build to that binary and > set sphinx_ok to 'yes'. > > But then (in the part of configure between these two patch hunks) > if the user uses the command line --sphinx-build=foo option we > will reset sphinx_build but don't reset sphinx_ok... > >> # Check if tools are available to build documentation. >> if test "$docs" != "no" ; then >> - if has_sphinx_build; then >> - sphinx_ok=yes >> - else >> - sphinx_ok=no >> + >> + if [ "$sphinx_ok" != "yes" ]; then >> + if test_sphinx_build "$sphinx_build"; then >> + sphinx_ok=yes >> + else >> + sphinx_ok=no >> + fi >> fi > > ...which means we'll skip this check entirely and won't > test to see whether the user-specified sphinx-build binary works. > >> + >> if has makeinfo && has pod2man && test "$sphinx_ok" = "yes"; then >> docs=yes >> else > > thanks > -- PMM > Oops! I've tried a new method of invoking sphinx instead of pursuing this, but I see it has a build failure for one of our CI tests, so I'll keep poking at it. --js
