| 12
 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
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 
 | #!/usr/bin/make -f
export PYBUILD_NAME=fabio
%:
	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
override_dh_clean:
	dh_clean
	rm -f $(patsubst %.pyx,%.c,$(wildcard fabio/ext/*.pyx))
	rm -rf build/html
	rm -rf *.egg-info
override_dh_auto_build:
	dh_auto_build
	#PYBUILD_SYSTEM=custom \
	#PYBUILD_BUILD_ARGS="PYTHONPATH={build_dir} http_proxy='localhost' sphinx-build -N -bhtml doc/source build/html" dh_auto_build 
	python setup.py build build_man build_doc
# unactive test for now
override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="PYTHONPATH={build_dir} FABIO_TESTIMAGES=testimages {interpreter} ./run_tests.py --installed" dh_auto_test
override_dh_install:
	dh_numpy
	dh_numpy3
	# move the scripts to right package
	dh_install -p fabio-bin debian/python-fabio/usr/bin usr/
	# remove all scripts installed by pybuild
	rm -rf debian/python-fabio/usr/bin
	rm -rf debian/python-fabio-dbg/usr/bin
	rm -rf debian/python3-fabio/usr/bin
	rm -rf debian/python3-fabio-dbg/usr/bin
	# remove all py/pyc/egg-info files from dbg packages
	find debian/python-fabio-dbg/usr -name "*.py" -type f -delete
	find debian/python-fabio-dbg/usr -name "*.pyc" -type f -delete
	find debian/python-fabio-dbg/usr -path '*/*.egg-info/*' -delete
	find debian/python-fabio-dbg/usr -name "*.egg-info" -type d -empty -delete
	find debian/python3-fabio-dbg/usr -name "*.py" -type f -delete
	find debian/python3-fabio-dbg/usr -name "*.pyc" -type f -delete
	find debian/python3-fabio-dbg/usr -path '*/*.egg-info/*' -delete
	find debian/python3-fabio-dbg/usr -name "*.egg-info" -type d  -empty -delete
	#Finally install stuff
	dh_install
override_dh_installman:
	dh_installman -p fabio-bin build/man/*.1
override_dh_installdocs:
	dh_installdocs "build/sphinx/html" -p fabio-doc
	dh_installdocs
 |