#!/usr/bin/make -f UPSTREAM_GIT := https://github.com/testing-cabal/testtools.git include /usr/share/openstack-pkg-tools/pkgos.make export http_proxy=http://127.0.0.1:9 export https_proxy=http://127.0.0.1:9 export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' -e 's/+dfsg1//' | head -n 1) export PYBUILD_NAME=testtools %: dh $@ --buildsystem=pybuild --with python3,sphinxdoc override_dh_auto_clean: rm -rf build .pybuild *.egg-info testtools/_version.py find . -iname '*.pyc' -delete for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done override_dh_sphinxdoc: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) python3 -m sphinx -b html doc $(CURDIR)/debian/python-testtools-doc/usr/share/doc/python-testtools-doc/html dh_sphinxdoc # Remove empty git placeholder files that make lintian unhappy. rm -f $(CURDIR)/debian/python-testtools-doc/usr/share/doc/python-testtools-doc/html/_static/placeholder.txt endif override_dh_auto_test: ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) set -ex ; for pyvers in $(PYTHON3S); do \ PYTHONPATH=$(CURDIR) PYTHON=python$$pyvers python$$pyvers -m testtools.run testtools.tests.test_suite ; \ done endif