#! /usr/bin/make -f ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) export DH_VERBOSE = 1 export PYBUILD_VERBOSE=1 else export DH_QUIET = 1 endif export PYBUILD_DISABLE_python2 = 1 export PYBUILD_DESTDIR_python3=debian/python3-pytools/ BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)") SPHINXOPTS:=-D today=\"$(BUILD_DATE)\" SPHINXOPTS+=-D html_last_updated_fmt=\"$(BUILD_DATE)\" %: dh $@ --with python3,sphinxdoc --buildsystem pybuild override_dh_auto_build: find pytools/ -name decorator.py -delete find pytools/ -name log.py -delete dh_auto_build override_dh_installdocs: # Don't build documentation when required not to do it ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) # Documentation requires pytools module to analyse existing types SPHINXOPTS="$(SPHINXOPTS)" pybuild --build -i python3 -s custom --build-args 'make -C {dir}/doc html' dh_installdocs endif override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) dh_auto_test --buildsystem pybuild -- --test-pytest endif