#!/usr/bin/make -f

override_dh_auto_test:
	# HOME points to a non-existent directory on buildds, but the tests want it
	TMPDIR=$$(mktemp --tmpdir -d pgxnclient.test.XXXXXX); \
	trap "rm -rf $$TMPDIR" 0 2 3 15; \
	HOME=$$TMPDIR dh_auto_test

override_dh_install:
	python setup.py install --prefix=/usr --root=$(CURDIR)/debian/pgxnclient --install-layout=deb

override_dh_auto_clean:
	dh_auto_clean
	find pgxnclient -name '*.pyc' | xargs -r rm

%:
	dh $@ --with python2
