#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

# For testing, we need to deploy the project in the build directory
# so that qiime2 plugins are loaded
export PYBUILD_BEFORE_TEST=python{version} setup.py develop --install-dir {build_dir}
# Un-deploy the project
export PYBUILD_AFTER_TEST=rm -v {build_dir}/site.py {build_dir}/.coverage*; \
	python{version} setup.py develop --uninstall --install-dir {build_dir}

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- -s custom --test-args="cd {build_dir}; py.test-3 --cov=q2_cutadapt"
endif
