aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'wscript')
-rw-r--r--wscript22
1 files 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'])