1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#!/usr/bin/make -f
PY3DEF=$(shell py3versions -vd)
SPHINXBUILD="/usr/share/sphinx/scripts/python{version.major}/sphinx-build"
# Build documentation for readthedocs
export READTHEDOCS=True
# Do not build for Travis
export TRAVIS_CI=False
%:
dh $@ --with=python3,sphinxdoc --buildsystem=pybuild
override_dh_auto_clean:
dh_auto_clean
$(MAKE) distclean
rm -rf html
override_dh_auto_build:
dh_auto_build
# Link mathjax in _static
ln -s /usr/share/javascript/mathjax \
documentation/source/_static/mathjax
pybuild --system=custom -p $(PY3DEF) --build \
--build-args="env PYTHONPATH={build_dir} $(MAKE) SPHINXBUILD=$(SPHINXBUILD)"
mv documentation/build/html html
override_dh_auto_test:
# We test breathe by building the documention. The documentation has already
# been built for the default Python 3 version, so we do not need to do this
# again.
override_dh_installdocs:
# Do not copy mathjax to the binary package
dh_installdocs -X_static/mathjax
override_dh_sphinxdoc:
# dh_link creates the link for mathjax after dh_sphinxdoc, so ignore
# MathJax.js
dh_sphinxdoc -XMathJax.js
|