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"
|