#! /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/ # Disable some tests as they expect siphash13 not available in Debian export PYBUILD_TEST_ARGS=-k 'not test_attrs_hashing and not test_class_hashing and not test_dataclass_hashing and not test_datetime_hashing and not test_hash_function' 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_clean: dh_auto_clean -rm -rf doc/_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