#!/usr/bin/make -f

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

override_dh_auto_install:
	python3 setup.py install \
	    --root=$(CURDIR)/debian/tmp \
	    --install-layout=deb \
	    --install-lib=/usr/share/salutatoi \
	    --install-scripts=/usr/share/salutatoi
	rm -rf $(CURDIR)/debian/tmp/usr/share/salutatoi/sat_pubsub/test/ \
	    $(CURDIR)/debian/tmp/usr/share/salutatoi/sat_pubsub-*.egg-info/
	find debian/tmp -name __pycache__ -type d | xargs rm -rf

# temporarily do not run tests (completely broken at the moment)
override_dh_auto_test:
#	PYTHONPATH=.:/usr/share/salutatoi; export PYTHONPATH; \
#	dh_auto_test -O--buildsystem=pybuild
