diff options
author | David Robillard <d@drobilla.net> | 2020-10-10 17:57:47 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:59 +0100 |
commit | 2efa5adcb730c70bc026fd3b59fa94397b9dc1e8 (patch) | |
tree | 2384e4a1ca0bd1985ea68a2289cd8cbf4b184ad5 /wscript | |
parent | ad779677faf86ff39b69efd95cd497bfb54096a9 (diff) | |
download | serd-2efa5adcb730c70bc026fd3b59fa94397b9dc1e8.tar.gz serd-2efa5adcb730c70bc026fd3b59fa94397b9dc1e8.tar.bz2 serd-2efa5adcb730c70bc026fd3b59fa94397b9dc1e8.zip |
fixup! WIP: Generate Sphinx documentation
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -433,10 +433,13 @@ def build(bld): # Python Documentation if bld.env.SERD_PYTHON and bld.env.DOCS: - bld.add_group('sphinx') - bld(features='sphinx', - sphinx_source='bindings/python', - sphinx_output_format='singlehtml') + if bld.env.SPHINX_BUILD: + bld.add_group('sphinx') + bld(features='sphinx', + sphinx_source='bindings/python', + sphinx_output_format='singlehtml') + else: + Logs.warn('Sphinx not found, not building Python documentation') # Man page bld.install_files('${MANDIR}/man1', 'doc/serdi.1') @@ -834,10 +837,13 @@ def test(tst): check([tst.env.PYTHON[0], '-m', 'unittest', 'discover', 'bindings/python']) - with tst.group('pythondoc') as check: - check([tst.env.SPHINX_BUILD[0], '-M', 'doctest', - '../bindings/python', - 'build/singlehtml']) + if tst.env.SPHINX_BUILD: + with tst.group('pythondoc') as check: + check([tst.env.SPHINX_BUILD[0], '-M', 'doctest', + '../bindings/python', + 'build/singlehtml']) + else: + Logs.warn('Sphinx not found, not running doctests') with tst.group('Unit') as check: check(['./base64_test']) |