#!/usr/bin/make -f
UPSTREAM = $(shell dpkg-parsechangelog | egrep '^Version: ' | cut -d ' ' -f 2- | cut -d '-' -f 1)

PY2VERS = $(shell pyversions -vr)

export http_proxy = http://127.0.9.1:9
export https_proxy = http://127.0.9.1:9

%:
	dh $@ --with python2

override_dh_install:
	dh_install -Xusr/bin/moksha
	rm debian/python-moksha.common/usr/lib/python*/dist-packages/moksha.common-*.egg-info/SOURCES.txt

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	set -e; for py in $(PY2VERS); do \
		python$$py setup.py test; \
	done
endif
