#!/usr/bin/make -f %: dh $@ --with python2,python3 .PHONY: override_dh_auto_test override_dh_auto_test: # Run the bundled tests (in-memory database) when building the package LC_ALL=C python ./django_restricted_resource/test_project/manage.py test LC_ALL=C python3 ./django_restricted_resource/test_project/manage.py test override_dh_auto_install: dh_auto_install python setup.py install --root=$(CURDIR)/debian/python-django-restricted-resource/ --install-layout=deb python3 setup.py install --root=$(CURDIR)/debian/python3-django-restricted-resource/ --install-layout=deb override_dh_auto_clean: dh_auto_clean $(RM) django_restricted_resource/__init__.pyc # Cleanup versiontools leftovers $(RM) -r setup.cfg django_restricted_resource.egg-info/ # get upstream version for get-orig-source target VERSION:= $(shell dpkg-parsechangelog | grep '^Version: ' | sed -e 's/^Version: //' | sed -e 's/\-.*$$//') sdist-orig: python setup.py sdist mv -v dist/django-restricted-resource-$(VERSION)*.tar.gz ../django-restricted-resource_$(VERSION).orig.tar.gz $(RM) -r versiontools-*.egg/