File: rules

package info (click to toggle)
python-django-contrib-comments 2.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,780 kB
  • sloc: python: 2,392; makefile: 142; xml: 15; sh: 6
file content (27 lines) | stat: -rwxr-xr-x 915 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export PYBUILD_NAME=django-contrib-comments
export PYBUILD_BEFORE_TEST=cp -r {dir}/tests {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests

%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

execute_before_dh_auto_build:
	set -e; \
	for loc in django_comments/locale/*; do \
		python3 setup.py compile_catalog --directory django_comments/locale/ --locale $$(basename $$loc) --domain django; \
	done

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

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