#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PYVERS :=  $(shell pyversions -s)
PY3VERS := $(shell py3versions -s)

%:
	dh $@ --with python2,python3

override_dh_auto_build:

override_dh_auto_clean:
	dh_auto_clean -- --all
	rm -rf build
	rm -rf doc/_build
	rm -f .hgignore
	rm -f .hgtags

override_dh_auto_install:
	dh_auto_install
	set -ex; \
	for py in $(PYVERS); do \
		$$py setup.py install --root debian/python-pysolr \
				      --install-layout=deb; \
	done
	set -ex; \
	for py in $(PY3VERS); do \
		$$py setup.py install --root debian/python3-pysolr \
				      --install-layout=deb; \
	done
