#!/usr/bin/make -f

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:
	mv $(CURDIR)/debian/python-websocket/usr/bin/wsdump.py $(CURDIR)/debian/python-websocket/usr/bin/wsdump
	dh_install

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e; for python in $(shell pyversions -r); do \
		echo Testing with $$python; \
		$$python -munittest test_websocket; \
	done;
else
	@echo "** tests disabled"
endif
