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

export DH_OPTIONS
export PYBUILD_NAME=empy

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	./test.sh python
	./test.sh python3
endif

override_dh_auto_install:
	dh_auto_install
	install -m 755 $(CURDIR)/debian/python-empy/usr/lib/python2.*/dist-packages/em.py $(CURDIR)/debian/python-empy/usr/bin/empy

override_dh_python3:
	dh_python3 --shebang='/usr/bin/env python3'
