File: rules

package info (click to toggle)
python-django-extensions 1.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,016 kB
  • ctags: 1,342
  • sloc: python: 8,873; makefile: 117
file content (35 lines) | stat: -rwxr-xr-x 1,105 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
35
#!/usr/bin/make -f

export PYBUILD_NAME=django-extensions

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

override_dh_install:
	dh_install
	# Don't embed jQuery
	find debian/python-django-extensions -name 'jquery-1.7.2.min.js' -type f -exec \
		ln -sf /usr/share/javascript/jquery/jquery.min.js {} \;
	find debian/python3-django-extensions -name 'jquery-1.7.2.min.js' -type f -exec \
		ln -sf /usr/share/javascript/jquery/jquery.min.js {} \;

get-orig-source:
	uscan --verbose --rename

override_dh_auto_test:
	PYTHONPATH=. \
	dh_auto_test -- --system=custom --test-args="{interpreter} -m pytest --ds=tests.testapp.settings --cov=django_extensions django_extensions"

override_dh_auto_build:
	set -e; \
	for loc in django_extensions/locale/*; do \
		python setup.py compile_catalog --directory django_extensions/locale/ --locale $$(basename $$loc) --domain django; \
	done
	mkdir docs/images
	ln debian/images/* docs/images
	PYTHONPATH=. sphinx-build -b html -d docs/.build/.doctrees -N docs docs/.build/html
	dh_auto_build

override_dh_clean:
	rm -rf docs/.build docs/images
	dh_clean