#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=pipenv
export DESTDIR=debian/pipenv

export PYBUILD_TEST_ARGS= \
	--ignore=tests/integration \
	--ignore=tests/unit/test_utils.py \
	--ignore=tests/unit/test_vendor.py

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

override_dh_auto_install:
	dh_auto_install
	# Remove docs/, installed in /usr/share/doc/pipenv
	rm -R $(DESTDIR)/usr/lib/python*/dist-packages/docs
	# Remove vendor license and readme files
	find $(DESTDIR)/usr/lib/python*/dist-packages/pipenv* -type f \( -iname "license*" -o -iname "*copying*" -o -iname "vendor.txt" -o -iname "patched.txt" -o -iname "top_level.txt" -o -name "README.*" \) -exec rm -v {} \;
	rm -rf $(DESTDIR)/usr/lib/python*/dist-packages/build
