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 41 42 43 44 45 46 47 48 49 50 51 52 53
|
#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE = 1
export PYBUILD_NAME=quart
include /usr/share/dpkg/pkg-info.mk
BUILD_DATE = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -N -D html_last_updated_fmt="$(BUILD_DATE)"
%:
dh $@ --with sphinxdoc --buildsystem=pybuild
override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
PYTHONPATH=`dirname $$(find .pybuild/ -type d -name "quart*dist-info" | head -n1)` \
python3 -m sphinx -b html $(SPHINXOPTS) docs $(CURDIR)/debian/python-quart-doc/usr/share/doc/python-quart-doc/html
dh_sphinxdoc
endif
override_dh_installdocs:
dh_installdocs -ppython-$(PYBUILD_NAME)-doc --doc-main-package=python3-$(PYBUILD_NAME)
dh_installdocs --remaining-packages
override_dh_auto_build:
# The name of the project need to be written in lowercase letters,
# otherwise pybuild wont find the WHEEL file (as it's created from the
# project name starting with an capital letter).
sed -i 's,name = "Quart",name = "quart",g' pyproject.toml
dh_auto_build
# Now undo the previous replacement again, we need to do this hack as
# dpkg will otherwise complain about modified source code of course in
# case the build is getting started twice in a row.
sed -i 's,name = "quart",name = "Quart",g' pyproject.toml
override_dh_installexamples:
dh_installexamples -ppython-$(PYBUILD_NAME)-doc --doc-main-package=python3-$(PYBUILD_NAME)
dh_installexamples --remaining-packages
override_dh_installchangelogs:
dh_installchangelogs CHANGES.md
override_dh_compress:
dh_compress -X.py
override_dh_clean:
rm -rf .pybuild \
.mypy_cache \
docs/reference/source/*
dh_clean
.PHONY: override_dh_auto_build override_dh_auto_clean override_dh_installdocs override_dh_installexamples override_dh_installchangelogs override_dh_compress
|