| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
# Uncomment this to turn on verbose mode. |
| 5 |
#export DH_VERBOSE=1 |
| 6 |
|
| 7 |
PYTHON3S:=$(shell py3versions -vr) |
| 8 |
|
| 9 |
%: |
| 10 |
dh $@ --buildsystem=pybuild |
| 11 |
|
| 12 |
execute_after_dh_auto_install: |
| 13 |
set -e && for pyvers in $(PYTHON3S); do \ |
| 14 |
python$$pyvers setup.py install --install-layout=deb \ |
| 15 |
--root $(CURDIR)/debian/python3-cram; \ |
| 16 |
done |
| 17 |
# install Python 3 version with different name |
| 18 |
mv $(CURDIR)/debian/python3-cram/usr/bin/cram \ |
| 19 |
$(CURDIR)/debian/python3-cram/usr/bin/cram3 |
| 20 |
# run with any Python 3 version |
| 21 |
sed -i s/python3.[0-9]/python3/ \ |
| 22 |
$(CURDIR)/debian/python3-cram/usr/bin/cram3 |
| 23 |
|
| 24 |
execute_after_dh_auto_test: |
| 25 |
# accept any test result until the relation between cram and coverage is clarified |
| 26 |
# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897516#53 |
| 27 |
PYTHON=python3 COVERAGE=python3-coverage $(MAKE) test || true |
| 28 |
|
| 29 |
execute_after_dh_clean: |
| 30 |
rm -rf $(CURDIR)/build |
| 31 |
rm -f $(CURDIR)/.coverage |