summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..c3b683d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,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