find sphinx-build before calling build.py

this allows us to use sphinx-build-3, as user might already in a python3
world, and distros, like fedora 28, tend to add a "-3" suffix to sphinx-build.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
Kefu Chai
2018-10-12 16:01:54 +08:00
committed by Victor Zverovich
parent 08a65c2282
commit 07200f445a
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -100,7 +100,8 @@ def build_docs(version='dev', **kwargs):
raise CalledProcessError(p.returncode, cmd)
html_dir = os.path.join(work_dir, 'html')
main_versions = reversed(versions[-3:])
check_call(['sphinx-build',
sphinx_build = os.environ.get('SPHINX_EXECUTABLE', 'sphinx-build')
check_call([sphinx_build,
'-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir),
'-Dversion=' + version, '-Drelease=' + version,
'-Aversion=' + version, '-Aversions=' + ','.join(main_versions),