summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 3fa2c3b9fb60e8172a466555a8fe145cf459dc11 (plain)
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
#!/usr/bin/make -f

#export DH_VERBOSE=1

export PYBUILD_NAME=jinja2

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

override_dh_auto_clean:
	make -C docs clean
	dh_auto_clean

override_dh_auto_build:
	# make sure installed version of jinja2 is not used during tests:
	dh_auto_build -- --disable=test
	pybuild --test --system=custom --test-args='PYTHONPATH="{build_dir}" {interpreter} -m pytest tests'
	# build documentation
	PYTHONPATH=$(CURDIR)/src:$(CURDIR)/docs make -C docs html

override_dh_installdocs:
	# install into -doc package and keep the symlink
	dh_installdocs -p python-jinja2-doc --doc-main-package python-jinja2-doc
	dh_installdocs --remaining

override_dh_installexamples:
	# install into -doc package and keep the symlink
	dh_installexamples -p python-jinja2-doc --doc-main-package python-jinja2-doc
	dh_installexamples --remaining

override_dh_installchangelogs:
	dh_installchangelogs CHANGES.rst