#!/usr/bin/make -f
#export DH_VERBOSE=1

PYTHON2:=$(shell pyversions -vr)
PYTHON3:=$(shell pyversions -vr)

export PYBUILD_NAME=sunpy
export http_proxy=127.0.0.1:9
export HOME=$(shell mktemp -d)

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

override_dh_auto_test:
	python -m pytest sunpy -k "not figure and not online"
	python3 -m pytest sunpy -k "not figure and not online"

override_dh_python2:
	dh_numpy
	dh_python2

override_dh_python3:
	dh_numpy
	dh_python3

override_dh_fixperms:
	chmod a-x debian/python*-sunpy/usr/lib/python*/dist-packages/sunpy/data/test/*.fts
	dh_fixperms
