File: rules

package info (click to toggle)
python-fabio 0.14.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,068 kB
  • sloc: python: 20,053; ansic: 1,085; makefile: 217; sh: 215
file content (45 lines) | stat: -rwxr-xr-x 1,675 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
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/make -f

export PYBUILD_NAME=fabio
export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/bin/

%:
	dh $@ --buildsystem=pybuild

execute_before_dh_clean:
        # remove the cython generated files distributed by upstream
	rm -f $(patsubst %.pyx,%.c,$(wildcard fabio/ext/*.pyx))
	rm -rf doc/build/html
	rm -rf build/man
	rm -rf *.egg-info

override_dh_auto_build-arch:
	dh_auto_build

override_dh_auto_build-indep: override_dh_auto_build-arch
	dh_auto_build -- -s custom --build-args="PYTHONPATH={build_dir} xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} setup.py build_man"

ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	dh_auto_build -- -s custom --build-args="cd doc && PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' {interpreter} -m sphinx -N -bhtml source build/html"
endif

override_dh_auto_test:
#       https://github.com/silx-kit/fabio/issues/153
#	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' FABIO_TESTIMAGES=testimages xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} ./run_tests.py" dh_auto_test

execute_after_dh_auto_install-indep:
        # install scripts into fabio-viewer
	python3 setup.py install_scripts -d debian/fabio-viewer/usr/bin

execute_after_dh_installdocs:
	dh_installdocs -p python-fabio-doc "doc/build/html" --doc-main-package=python3-fabio

execute_after_dh_installman:
	dh_installman -p fabio-viewer build/man/*.1

execute_after_dh_link:
	dh_link -p python-fabio-doc /usr/share/javascript/mathjax /usr/share/doc/python-fabio/html/_static/mathjax

override_dh_sphinxdoc:
	dh_sphinxdoc -p python-fabio-doc -X_static/mathjax -O--buildsystem=pybuild