#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk
export PDM_BUILD_SCM_VERSION=$(shell dpkg-parsechangelog -S Version | cut -d- -f 1)
export PYBUILD_TEST_ARGS = -k 'not network and not test_build_with_no_isolation and not test_find_candidates_from_find_links and not test_session_sources_all_proxy and not test_init_project_respect_version_file and not test_init_project_respect_version_file and not test_create_venv_in_project and not test_find_interpreters_with_PDM_IGNORE_ACTIVE_VENV and not test_run and not test_find_python'

%:
	dh $@ --buildsystem=pybuild

override_dh_installchangelogs:
	dh_installchangelogs -k CHANGELOG.md

execute_after_dh_python3:
	# Drop .pdm.toml
	rm -fv debian/*/usr/lib/python3/dist-packages/.pdm.toml
	 # Drop __pypackages__
	rm -rfv debian/*/usr/lib/python3/dist-packages/__pypackages__
	# Drop .pdm-python
	rm -fv debian/*/usr/lib/python3/dist-packages/.pdm-python
