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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#!/usr/bin/make -f
#DH_VERBOSE=1
PYTHON2 := $(shell pyversions -vr)
PYTHON3 := $(shell py3versions -vr)
%:
dh $@ --with python2,python3
#override_dh_installchangelogs:
# dh_installchangelogs HISTORY
#override_dh_strip:
# dh_strip --dbg-package=python-setproctitle-dbg
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
#
#override_dh_auto_test: $(PYTHON2:%=test-%-stamp) $(PYTHON3:%=test-%-stamp)
#test-%-stamp:
# mkdir -p build/test-$*
# python$* setup.py build
# python$* setup.py install_lib -d build/test-$*
#ifeq (,$(findstring kfreebsd,$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)))
# PYTHONPATH=build/test-$* python$* /usr/bin/nosetests -v tests
#endif
# touch test-python-$*-stamp
#
test-python%:
true
# python$* nosetests-$* -v tests
override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)
endif
build-python%:
python$* setup.py build
override_dh_auto_build: $(PYTHON3:%=build-python%)
dh_auto_build
rst2man README.rst | nroff -mandoc > build/README
rst2man HISTORY.rst | nroff -mandoc > build/HISTORY
install-python%:
python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
override_dh_auto_install: $(PYTHON2:%=install-python%) $(PYTHON3:%=install-python%)
override_dh_strip:
dh_strip -k
for P in python-setproctitle python3-setproctitle; do \
mv debian/$${P}/usr/lib/debug/* debian/$${P}-dbg/usr/lib/debug; \
done
override_dh_auto_clean:
dh_auto_clean
-rm -rf build
-rm -rf *.egg-info
-find . -name '*.py[oc]' | xargs rm -f
|