From 2efa5adcb730c70bc026fd3b59fa94397b9dc1e8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 10 Oct 2020 17:57:47 +0200 Subject: fixup! WIP: Generate Sphinx documentation --- wscript | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/wscript b/wscript index 68b2878b..77f85c35 100644 --- a/wscript +++ b/wscript @@ -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']) -- cgit v1.2.1