File: rules

package info (click to toggle)
django-filter 25.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,228 kB
  • sloc: python: 7,970; javascript: 7,213; makefile: 157; sh: 16
file content (34 lines) | stat: -rwxr-xr-x 1,047 bytes parent folder | download
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
# -*- makefile -*-

#export DH_VERBOSE=1

SPHINXOPTS := -E -N

export PYBUILD_NAME=django-filters

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	@echo
	@echo "Rebuild the GNU message catalogs..."
	@echo
	@for lang in `find django_filters/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
	dh_auto_build

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html $(SPHINXOPTS) docs $(CURDIR)/debian/python-django-filters-doc/usr/share/doc/python-django-filters-doc/html
	rm -rf $(CURDIR)/debian/python-django-filters-doc/usr/share/doc/python-django-filters-doc/html/.doctrees
	dh_sphinxdoc
endif

override_dh_auto_test:
	dh_auto_test -- --system=custom --test-args="PYTHONPATH={build_dir} {interpreter} ./runtests.py"