#!/usr/bin/make -f

%:
	dh $@ --with python2

override_dh_auto_build:
	dh_auto_build
	epydoc --html -o debian/html --name=Munkres \
	       --url=http://bmc.github.com/munkres/ munkres.py

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p test-output
	set -e; \
	for ver in $(shell pyversions -vr); do \
		echo "Testing python$$ver..."; \
		python$$ver munkres.py > test-output/$$ver; \
		diff -u test-output/$$ver debian/test-output; \
	done
endif

override_dh_compress:
	dh_compress -X.js

override_dh_clean:
	dh_clean
	rm -rf debian/html test-output
