#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export PYBUILD_NAME = qiime

include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# For testing, we need .egg-info so the entry points are available.
export PYBUILD_BEFORE_TEST=python{version} setup.py develop --install-dir {build_dir}
# Delete .egg-info and other files that were generated along with .egg-info
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/qiime2.egg-* {build_dir}/site.py {build_dir}/easy-install.pth

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

override_dh_auto_test:
	LC_ALL=C.UTF-8 dh_auto_test -- -s custom --test-args="cd {build_dir}; QIIMETEST= nosetests3"
