#!/usr/bin/make -f UPSTREAM_GIT := https://github.com/django/django-formtools.git include /usr/share/openstack-pkg-tools/pkgos.make export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' | head -n 1) %: dh $@ --buildsystem=python_distutils --with python3,sphinxdoc override_dh_auto_clean: rm -rf build *.egg-info .coverage find . -iname '*.pyc' -delete for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done override_dh_auto_build: echo "Do nothing..." override_dh_auto_test: echo "Do nothing..." override_dh_auto_install: pkgos-dh_auto_install --no-py2 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) set -e ; set -x ; for pyvers in $(PYTHON3S); do \ PYMAJOR=`echo $$pyvers | cut -d'.' -f1` ; \ echo "===> Testing with python$$pyvers (python$$PYMAJOR)" ; \ if [ $$PYMAJOR = "2" ] ; then \ LIBDIR_END=$$pyvers ; \ else \ LIBDIR_END=$$PYMAJOR ; \ fi ; \ PYTHONPATH=. DJANGO_SETTINGS_MODULE=tests.settings PYTHON=python$${pyvers} python$${PYMAJOR}-coverage run /usr/bin/django-admin test tests ; \ done endif override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. python3 -m sphinx -b html docs debian/python-django-formtools-doc/usr/share/doc/python-django-formtools-doc/html dh_sphinxdoc endif