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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# tell pybuild which module to install into the packages
export PYBUILD_NAME=debian
VERSION := $(shell dpkg-parsechangelog | grep '^Version: ' | awk '{print $$2}')
%:
dh $@ --with python2,python3 --buildsystem pybuild
%.py: %.py.in
sed -e 's/__CHANGELOG_VERSION__/$(VERSION)/' < $< > $@
override_dh_auto_clean: setup.py
dh_auto_clean
override_dh_auto_build: setup.py
dh_auto_build
lib/debian/doc-debtags > README.debtags
override_dh_auto_test:
# don't run the tests if suppressed with DEB_BUILD_OPTIONS=nocheck
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# run all the tests with both a UTF-8 aware locale and a non-UTF-8
# aware locale to catch errors related to encoding.
LC_ALL=C nosetests --verbose --exe --where tests
LC_ALL=C.UTF-8 nosetests --verbose --exe --where tests
LC_ALL=C nosetests3 --verbose --exe --where tests
LC_ALL=C.UTF-8 nosetests3 --verbose --exe --where tests
endif
override_dh_auto_install:
dh_auto_install
# setuputils may produce different files for different versions of
# python and dh_python3 will leave them behind.
rm -rf $(CURDIR)/*/usr/lib/python3.*
override_dh_installexamples:
# TODO: Enrico would like to keep wxssearch out of the package
# but so far, he has no better place for it
dh_installexamples -X wxssearch
|