aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-10-10 17:57:47 +0200
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:59 +0100
commit2efa5adcb730c70bc026fd3b59fa94397b9dc1e8 (patch)
tree2384e4a1ca0bd1985ea68a2289cd8cbf4b184ad5
parentad779677faf86ff39b69efd95cd497bfb54096a9 (diff)
downloadserd-2efa5adcb730c70bc026fd3b59fa94397b9dc1e8.tar.gz
serd-2efa5adcb730c70bc026fd3b59fa94397b9dc1e8.tar.bz2
serd-2efa5adcb730c70bc026fd3b59fa94397b9dc1e8.zip
fixup! WIP: Generate Sphinx documentation
-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'])