#!/usr/bin/make -f
#export DH_VERBOSE = 1

export PYBUILD_NAME=tldextract
export PYBUILD_DESTDIR_python3=debian/python3-${PYBUILD_NAME}
export PYBUILD_TEST_PYTEST=1
export PYBUILD_BEFORE_TEST=cp -r {dir}/CHANGELOG.md {dir}/tests/ {dir}/scripts/ {build_dir}/ ; cp /usr/share/publicsuffix/public_suffix_list.dat {build_dir}/tldextract/.tld_set_snapshot
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/CHANGELOG.md  {build_dir}/tests/ {build_dir}/scripts/ {build_dir}/tldextract/.tld_set_snapshot
export PYBUILD_TEST_ARGS=-k "not test_multiprocessing_makes_one_request"

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install
	dh_movefiles --package=tldextract --sourcedir=$(PYBUILD_DESTDIR_python3) usr/bin
