#!/usr/bin/make -f

export PYBUILD_NAME=bottleneck

export DH_ALWAYS_EXCLUDE=LICENSE

export VER=$(shell dpkg-parsechangelog -S Version | rev | cut -d- -f2- | rev)

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

override_dh_auto_build:
	dh_auto_build
	http_proxy='127.0.0.1:9' python setup.py build_sphinx

override_dh_auto_install:
	dh_auto_install
	dh_numpy
	dh_installchangelogs RELEASE.rst

get-orig-source:
	git clone https://github.com/kwgoodman/bottleneck.git get-orig-source-foo-dir &&\
	cd get-orig-source-foo-dir  &&\
	git archive --format=tar --prefix=bottleneck-$(VER)/ $(VER) | xz -9 -c >../bottleneck_$(VER).orig.tar.xz
	rm -rf get-orig-source-foo-dir
