#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE = 1
export PYBUILD_NAME = pydicom

PYS = $(shell pyversions -r)
export  http_proxy=http://127.0.0.1:9/
export  https_proxy=http://127.0.0.1:9/

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

override_dh_auto_build:
	dh_auto_build
	cd doc; PYTHONPATH=.. python3 /usr/bin/sphinx-build -N -bhtml . build/html

override_dh_auto_install:
	-find -name __pycache__ | xargs rm -r
	dh_auto_install

override_dh_clean:
	dh_clean
	rm -rf .pydistutils.cfg build

#override_dh_auto_test:
#	cd source; \
#	for PYTHON in $(PYS); do \
#        $$PYTHON setup.py test || exit 1; \
#    done
