diff options
-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']) |