File: rules

package info (click to toggle)
python-fabio 0.4.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,788 kB
  • ctags: 6,209
  • sloc: python: 12,748; ansic: 1,091; makefile: 129
file content (38 lines) | stat: -rwxr-xr-x 1,214 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

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

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

override_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 *.egg-info
	dh_clean

# unactive test for now
override_dh_auto_test:
#	PYBUILD_SYSTEM=custom \
#	PYBUILD_TEST_ARGS="PYTHONPATH={build_dir} FABIO_TESTIMAGES=testimages {interpreter} ./run_tests.py" dh_auto_test

override_dh_install:
	dh_install
	dh_numpy
	dh_numpy3

        # install scripts into fabio-viewer
	python setup.py install_scripts -d debian/fabio-viewer/usr/bin

override_dh_installman:
	dh_installman -p fabio-viewer doc/man/fabio_viewer.1

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYBUILD_SYSTEM=custom \
	PYBUILD_BUILD_ARGS="cd doc && PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' {interpreter} -c \"import sys;from sphinx import main;sys.exit(main(sys.argv))\" -N -bhtml source build/html" dh_auto_build  # HTML generator
	dh_installdocs "doc/build/html" -p python-fabio-doc
	dh_sphinxdoc -O--buildsystem=pybuild
endif