summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: c3b683dadcc5de85c2745977e36b6fc56f9b08e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/make -f

export PYBUILD_NAME=pyphen
buildvers := $(shell pyversions -sv)
build3vers := $(shell py3versions -sv)

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(CURDIR)/.pytest

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e && for i in $(buildvers); do \
	  echo "-- running tests for python"$$i" --" ; \
	  python$$i /usr/bin/py.test test.py;\
	done
	set -e && for i in $(build3vers); do \
	  echo "-- running tests for python"$$i" --" ; \
	  python$$i /usr/bin/py.test-3 test.py;\
	done
endif