Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 #export DH_VERBOSE = 1
5
6 SPHINXOPTS := -E -N
7
8 export PYBUILD_NAME=django-captcha
9
10 %:
11 dh $@ --buildsystem=pybuild
12
13 override_dh_clean:
14 dh_clean
15 rm -rf .mypy_cache
16
17 override_dh_sphinxdoc:
18 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
19 PYTHONPATH=. python3 -m sphinx -b html $(SPHINXOPTS) docs/ $(CURDIR)/debian/python-django-captcha-doc/usr/share/doc/python-django-captcha-doc/html
20 dh_sphinxdoc
21 endif
22
23 .PHONY: override_dh_auto_test
24 override_dh_auto_test:
25 dh_auto_test -- --system=custom --test-args="cd testproject && {interpreter} manage.py test captcha"
26
27 override_dh_install:
28 dh_install
29 find debian/python3-django-captcha -name Vera.ttf -exec \
30 ln -sf /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf {} \;;
31 # Remove these *.TXT files, we link to the used font any way.
32 rm debian/python3-django-captcha/usr/lib/python3*/dist-packages/captcha/fonts/*.TXT
33
34 override_dh_auto_build: rebuild-locale
35 dh_auto_build
36
37 rebuild-locale:
38 @echo
39 @echo "Rebuild the GNU message catalogs..."
40 @echo
41 for lang in `find captcha/locale/ -maxdepth 1 -type d | sort`; do \
42 if [ -f $${lang}/LC_MESSAGES/django.po ]; then \
43 LANG=`basename $${lang}` ;\
44 echo "Create message catalog for '$${LANG}'" ;\
45 msgfmt -v $${lang}/LC_MESSAGES/django.po -o $${lang}/LC_MESSAGES/django.mo ;\
46 fi ;\
47 done