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
|
export HOME=$(CURDIR)
export PYBUILD_TEST_ARGS={dir}/tests/tests.py
export PYBUILD_NAME=flask-paginate
export DOC_PKG := python-flask-paginate-doc
export DOC_PKG_PATH := $(CURDIR)/debian/$(DOC_PKG)
%:
dh $@ --with sphinxdoc --buildsystem=pybuild
override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
PYTHONPATH=flask_paginate python3 -m sphinx -b html -d debian/doctrees \
-N docs/ $(DOC_PKG_PATH)/usr/share/doc/$(DOC_PKG)/html
endif
override_dh_link:
dh_link
jdupes -rl debian/python-flask-paginate-doc/usr/share/doc/
rm -rf debian/doctree
find debian/python-flask-paginate-doc/ -name '*.html' \
-exec sed -i 's|http://s3.amazonaws||g' {} \;
find debian/python-flask-paginate-doc/usr/share/doc -name '*.js' -delete
|