#!/usr/bin/make -f
#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck
export PYBUILD_NAME=numba
export PYBUILD_INSTALL_ARGS=--install-scripts=/usr/share/{package}

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

override_dh_auto_test:
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -Wd -m pytest {build_dir}/numba/tests -v -rs" dh_auto_test || true # temporarily failsafed

override_dh_installchangelogs:
	dh_installchangelogs -A CHANGE_LOG

override_dh_installdocs:
	dh_installdocs -A README.rst
	cp -a docs CHANGE_LOG examples .pybuild/pythonX.Y_2.7/build
	http_proxy='127.0.0.1:9' sphinx-build -N -bhtml .pybuild/pythonX.Y_2.7/build/docs/source/ debian/numba-doc/usr/share/doc/numba-doc/html/

override_dh_compress:
	dh_compress -X.ipynb -X.ods -X.py # save examples and notebooks

override_dh_gencontrol:
	dh_numpy
	dh_numpy3
	dh_gencontrol
