#!/usr/bin/make -f

# This file was automatically generated by stdeb 0.8.5 at
# Fri, 02 Oct 2015 13:26:38 +0300
export PYBUILD_NAME=custodia

# don't download packages
export PIP_INDEX_URL=http://host.invalid./

# Don't try to download dnspython3. The package is provided by python-dnspython
export PIP_NO_DEPS=yes

# Ignore all install packages to enforce installation of sdist. Otherwise tox
# may pick up this package from global site-packages instead of source dist.
export PIP_IGNORE_INSTALLED=yes

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

override_dh_auto_test:
	tox --sitepackages -e py27 -- --skip-servertests
	tox --sitepackages -e py36 -- --skip-servertests

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/custodia/usr/share/doc
	find debian/python*/ -name '*.egg-info' -exec rm '{}' ';'
	find debian/.*/ -name 'LICENSE' -exec rm '{}' ';'
	for i in bin share/doc/custodia share/man; do \
		rm -rf debian/python3-custodia/usr/$$i; done

override_dh_clean:
	dh_clean
	rm -f .coverage.*
	rm -rf .tox
	rm -rf src/custodia.egg-info
