#!/usr/bin/make -f
# Supported Python versions
PYVERS = $(shell pyversions -vr)
# Callable functions to determine the correct PYTHONPATH
pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1))
%:
dh $@ --with=python2,sphinxdoc --buildsystem=python_distutils
override_dh_clean:
dh_clean
rm -rf docs/_build
override_dh_auto_build:
dh_auto_build
python setup.py build_sphinx
override_dh_auto_install:
dh_auto_install
rm debian/tmp/usr/lib/python*/*-packages/Flask_Babel-*.egg-info/SOURCES.txt
override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
set -ex && cd tests && for py in $(PYVERS); do \
PYTHONPATH=$(call pythonpath,$$py) python$$py tests.py ;\
done
endif