Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 #export DH_VERBOSE=1
5
6 SPHINXOPTS := -E -N
7
8 export PYBUILD_NAME=django-filters
9
10 %:
11 dh $@ --buildsystem=pybuild
12
13 override_dh_auto_build:
14 @echo
15 @echo "Rebuild the GNU message catalogs..."
16 @echo
17 @for lang in `find django_filters/locale/ -maxdepth 1 -type d | sort`; do \
18 if [ -f $${lang}/LC_MESSAGES/django.po ]; then \
19 LANG=`basename $${lang}` ;\
20 echo "Create message catalog for '$${LANG}'" ;\
21 msgfmt -v $${lang}/LC_MESSAGES/django.po -o $${lang}/LC_MESSAGES/django.mo ;\
22 fi ;\
23 done
24 dh_auto_build
25
26 override_dh_sphinxdoc:
27 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
28 PYTHONPATH=. python3 -m sphinx -b html $(SPHINXOPTS) docs $(CURDIR)/debian/python-django-filters-doc/usr/share/doc/python-django-filters-doc/html
29 rm -rf $(CURDIR)/debian/python-django-filters-doc/usr/share/doc/python-django-filters-doc/html/.doctrees
30 dh_sphinxdoc
31 endif
32
33 override_dh_auto_test:
34 dh_auto_test -- --system=custom --test-args="PYTHONPATH={build_dir} {interpreter} ./runtests.py"