#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1
export PYBUILD_NAME=freezegun

override_dh_auto_clean:
	dh_auto_clean
	find . -name '*.pyc' -delete -print
	rm -rf *.egg-info build .coverage freezegun.egg-info

%:
	dh $@ --with python2,python3 --buildsystem=pybuild

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	for python in $(shell pyversions -r); do \
		$$python /usr/bin/nosetests tests; \
	done
	for python in $(shell py3versions -r); do \
		$$python /usr/bin/nosetests tests; \
	done
endif

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG
