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
|
#!/usr/bin/make -f
export PYBUILD_NAME=py-stringmatching
VERSIONEDPYTHON=python$(shell pybuild --print version | sed -e 's/^.*: //')
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
execute_after_dh_auto_build:
PYTHONPATH=$(CURDIR)/test-install $(VERSIONEDPYTHON) setup.py develop --install-dir=test-install
PYTHONPATH=$(CURDIR)/test-install $(MAKE) -C docs html latexpdf
# Use local MathJax; we assume it is version 2.7.x for now -
# this will need updating when MathJax 3.x arrives in Debian and
# Sphinx.
cd docs/_build/html && find . -type f -print0 | \
xargs -0 perl -i -pe 's%src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.\d/latest.js\?config=TeX-AMS-MML_HTMLorMML"%src="file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"%'
execute_after_dh_auto_clean:
$(MAKE) -C docs clean
rm -rf test-install
override_dh_installdocs:
dh_installdocs -ppython-py-stringmatching-doc --doc-main-package=python3-py-stringmatching
dh_installdocs --remaining-packages
else
%:
dh $@ --with python3 --buildsystem=pybuild
endif
|