1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PYVERS:=$(shell pyversions -s)
%:
dh $@
override_dh_auto_install:
dh_auto_install
# it's just 'unit2' but it's targetted to windows systems
rm $(CURDIR)/debian/python-unittest2/usr/bin/unit2.py
override_dh_auto_test:
for python in $(PYVERS) ; do \
# retrive the lib path \
LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_purelib") ; \
# retrieve the script path \
SCRIPT=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_scripts") ; \
# call the unit2 test script discovering the current LIB dir \
PYTHONPATH=$$LIB $$python $$SCRIPT/unit2 discover -s $$LIB ; \
done
|