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
|
#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
BUILD_DATE = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -E -N -D html_last_updated_fmt="$(BUILD_DATE)"
export PYBUILD_NAME=flask-sqlalchemy
export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/lib/python3*/dist-packages/*.dist-info/licenses
%:
dh $@ --buildsystem=pybuild
override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
#############################################################################
# Pallets is using the Python packages pallets-sphinx-themes, sphinx-issues #
# *and* flask_sqlalchemy to create the running setup for the sphinx run. #
# As we are building python3-flask-sqlalchemy right now the usual call for #
# sphinx would fail as no package meta information would be found found. #
# We also can't use the package build in debian/python3-flask-sqlalchemy #
# as the installation didn't is finished yet! #
# So we must relay an the build folder from the wheel creation in #
# /build/package/.pybuild. We pick up the folder with the most recent #
# Python build, while introducing a new Python version into Debian the #
# package wheel build will happen for all available Python versions! #
# The meta information is then the same, and the meta information is the #
# sphinx build looking for. #
#############################################################################
PYTHONPATH=`dirname $$(find .pybuild/ -type d -name "flask_sqlalchemy*dist-info" | head -n1)` \
python3 -m sphinx -b html $(SPHINXOPTS) docs $(CURDIR)/debian/flask-sqlalchemy-doc/usr/share/doc/flask-sqlalchemy-doc/html
dh_sphinxdoc
endif
override_dh_installdocs:
find examples -type f -name ".gitignore" -exec rm {} \;
dh_installdocs
override_dh_auto_test:
dh_auto_test -- --system=custom --test-args="PYTHONPATH={build_dir} {interpreter} -m pytest -v -W 'once::DeprecationWarning'"
|