From 86e16af97cb2615db0f9588cefd22b350a22c152 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 7 Aug 2015 14:20:32 +0200 Subject: [PATCH] debian: Distribute the html version of the ipython notebooks * configure.ac: Check for ipython. * wrap/python/tests/Makefile.am (nb-html): New rule, using ipython. * debian/control: Depend on ipython. * debian/rules: Run nb-html. * debian/python3-spot.examples: Install the genrated html files. --- configure.ac | 1 + debian/control | 2 +- debian/python3-spot.examples | 1 + debian/rules | 1 + wrap/python/tests/Makefile.am | 7 +++++++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f5cb3694a..7d1d12697 100644 --- a/configure.ac +++ b/configure.ac @@ -161,6 +161,7 @@ AC_CHECK_PROG([PERL], [perl], [perl]) AC_CHECK_PROG([SPIN], [spin], [spin]) AC_CHECK_PROG([LBTT], [lbtt], [lbtt]) AC_CHECK_PROG([EMACS], [emacs], [emacs]) +AC_CHECK_PROG([IPYTHON], [ipython3], [ipython]) AC_CHECK_PROG([LBTT_TRANSLATE], [lbtt-translate], [lbtt-translate]) AX_CHECK_VALGRIND AC_CHECK_PROG([WRING2LBTT], [wring2lbtt], [wring2lbtt]) diff --git a/debian/control b/debian/control index 1f0770e84..94caef76c 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: spot Section: science Priority: optional Maintainer: Alexandre Duret-Lutz -Build-Depends: debhelper (>= 9), python3-all-dev +Build-Depends: debhelper (>= 9), python3-all-dev, ipython3-notebook Standards-Version: 3.9.6 Homepage: http://spot.lrde.lip6.fr/ diff --git a/debian/python3-spot.examples b/debian/python3-spot.examples index 857e08743..00c57ff78 100644 --- a/debian/python3-spot.examples +++ b/debian/python3-spot.examples @@ -1 +1,2 @@ wrap/python/tests/*.ipynb +wrap/python/tests/*.html diff --git a/debian/rules b/debian/rules index 5ea230558..26a0975f9 100755 --- a/debian/rules +++ b/debian/rules @@ -73,6 +73,7 @@ override_dh_python3: dh_python3 -p python3-spot override_dh_auto_build: dh_auto_build + $(MAKE) -C wrap/python/tests nb-html fix-mathjax: perl -pi -e 's|http://orgmode.org/mathjax/MathJax.js|file:///usr/share/javascript/mathjax/MathJax.js|' doc/userdoc/*.html diff --git a/wrap/python/tests/Makefile.am b/wrap/python/tests/Makefile.am index bec3f22da..667f768b4 100644 --- a/wrap/python/tests/Makefile.am +++ b/wrap/python/tests/Makefile.am @@ -52,3 +52,10 @@ TESTS = \ relabel.py \ setxor.py \ testingaut.ipynb + +SUFFIXES = .ipynb .html +.ipynb.html: + $(IPYTHON) nbconvert $< --to html + +.PHONY: nb-html +nb-html: $(TESTS:.ipynb=.html)