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
|
#!/usr/bin/make -f
export PYBUILD_NAME=django-mptt
export PYBUILD_TEST_CUSTOM=1
export PYBUILD_TEST_ARGS=PYTHONPATH=.:tests {interpreter} /usr/bin/django-admin test --settings=settings --verbosity 2 --traceback myapp
%:
dh $@ --buildsystem=pybuild
override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
PYTHONPATH=. python3 -m sphinx -b html -N docs $(CURDIR)/debian/python-django-mptt-doc/usr/share/doc/python-django-mptt-doc/html
dh_sphinxdoc
endif
override_dh_auto_clean:
rm -rf build
find mptt/ -type f -name django.mo -delete
dh_auto_clean
override_dh_auto_build: rebuild-locale
dh_auto_build
rebuild-locale:
@echo
@echo "Rebuild the GNU message catalogs..."
@echo
for lang in `find mptt/locale/ -maxdepth 1 -type d | sort`; do \
if [ -f $${lang}/LC_MESSAGES/django.po ]; then \
LANG=`basename $${lang}` ;\
echo "Create message catalog for '$${LANG}'" ;\
msgfmt -v $${lang}/LC_MESSAGES/django.po -o $${lang}/LC_MESSAGES/django.mo ;\
fi ;\
done
|