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

## Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#export NOSE_VERBOSE=2

export PYBUILD_NAME=lmfit

## This might have been used, but doctest should be optional
## https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749506
#export PYBUILD_TEST_NOSE=1

# copy the tests to the build dir to be able to pass nose
export PYBUILD_AFTER_BUILD=cp -r NIST_STRD {build_dir}
export PYBUILD_BEFORE_INSTALL=rm -fr {build_dir}/NIST_STRD
export PYBUILD_AFTER_INSTALL_python2=dh_numpy
export PYBUILD_AFTER_INSTALL_python3=dh_numpy3

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

override_dh_clean:
	rm -rf doc/_static/conf_interval2.png
	rm -rf doc/_static/conf_interval.png
	dh_clean

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. http_proxy='localhost' sphinx-build -N -bhtml doc/ build/html  # HTML generator
