#!/usr/bin/make -f

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

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

override_dh_install:
	dh_install
	find debian -name LICENSE.txt -delete
	find debian -name '*.fasta' -delete

override_dh_auto_clean:
	dh_auto_clean
	rm -rf .pytest_cache nextstrain_augur.egg-info

# The below hoops are required for the tests involving mypy and flake8.
BUILD_DIRS := $(wildcard $(CURDIR)/.pybuild/cpython*_*/build)
execute_before_dh_auto_test:
	$(foreach build_dir,$(BUILD_DIRS), cp -v mypy.ini $(build_dir) &&) :
	$(foreach build_dir,$(BUILD_DIRS), cp -v .flake8 $(build_dir) &&) :
execute_after_dh_auto_test:
	$(foreach build_dir,$(BUILD_DIRS), rm -v $(build_dir)/mypy.ini &&) :
	$(foreach build_dir,$(BUILD_DIRS), rm -v $(build_dir)/.flake8 &&) :
