#!/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 %: dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc override_dh_auto_install: pkgos-dh_auto_install # Remove 2x compat file as it causes errors during byte compilation on installation. echo 'raise SyntaxError' > \ $(CURDIR)/debian/python3-testtools/usr/lib/python3/dist-packages/testtools/_compat2x.py override_dh_sphinxdoc: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) sphinx-build -b html doc $(CURDIR)/debian/python-testtools-doc/usr/share/doc/python-testtools-doc/html dh_sphinxdoc -O--buildsystem=python_distutils # 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 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test: set -ex ; for pyvers in $(PYTHONS) $(PYTHON3S); do \ PYTHONPATH=$(CURDIR) PYTHON=python$$pyvers python$$pyvers -m testtools.run testtools.tests.test_suite ; \ done endif