#!/usr/bin/make -f

%:
	dh $@ --with python2

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	echo "SECRET_KEY='test'" > threadedcomments/testsettings.py; \
	set -e; \
	for python in $(shell pyversions -r); do \
		DJANGO_SETTINGS_MODULE="threadedcomments.testsettings" \
		$$python -m threadedcomments.tests; \
	done; \
    rm threadedcomments/testsettings.py
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -rf django_threadedcomments.egg-info
