File: rules

package info (click to toggle)
python-djvulibre 0.8.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 608 kB
  • sloc: python: 2,648; sh: 105; makefile: 40
file content (32 lines) | stat: -rwxr-xr-x 903 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
#!/usr/bin/make -f
export DH_VERBOSE=1
export PYBUILD_NAME=djvu
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
ifneq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
	dh $@ --with python3 --buildsystem=pybuild

else
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild
endif

override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="unset LANGUAGE; cd {dir}/tests; ln -sf {build_dir}/djvu djvu; {interpreter} -m nose --verbose --no-skip; rm djvu" \
	dh_auto_test

override_dh_install:
	rm -r debian/python*-djvu/usr/lib/python*/dist-packages/djvu/dllpath.py

override_dh_installdocs:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	python3 setup.py build_ext -i
	http_proxy='127.0.0.1:9' python3 setup.py build_sphinx
endif
	dh_installdocs -Xobjects.inv -A doc/credits

override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
	dh_strip -ppython3-djvu --dbg-package=python3-djvu-dbg
endif