aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'wscript')
-rw-r--r--wscript15
1 files changed, 15 insertions, 0 deletions
diff --git a/wscript b/wscript
index 3e1f5027..030b836e 100644
--- a/wscript
+++ b/wscript
@@ -63,6 +63,9 @@ def configure(conf):
conf.load('autowaf', cache=True)
+ if conf.env.SERD_PYTHON and conf.env.DOCS:
+ conf.load('sphinx')
+
if not autowaf.set_c_lang(conf, 'c11', mandatory=False):
autowaf.set_c_lang(conf, 'c99')
@@ -425,6 +428,13 @@ def build(bld):
name='index',
SERD_VERSION=SERD_VERSION)
+ # 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')
+
# Man page
bld.install_files('${MANDIR}/man1', 'doc/serdi.1')
@@ -821,6 +831,11 @@ 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'])
+
with tst.group('Unit') as check:
check(['./base64_test'])
check(['./bigint_test'])