#!/usr/bin/make -f

export PYBUILD_NAME=colorama

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	# The shebang used in the examples is based on classical Python2, fixing
	# by replacing with a usable one.
	for file in `find demos -type f -name "*.py"`; do \
	    sed -i 's/^#!\/usr\/bin\/python/#!\/usr\/bin\/python3/g' $$file ;\
	done
	dh_auto_build

override_dh_auto_test:
	dh_auto_test -- --system=custom --test-args="PYTHONPATH={build_dir} {interpreter} -m pytest -v colorama/tests"
