#!/usr/bin/make -f

export PYBUILD_NAME=peachpy
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS=-v -k-TestARM

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

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml	sphinx/ build/html
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bman	sphinx/ build/man

override_dh_auto_clean:
	dh_auto_clean
	rm -rf "$(CURDIR)/.eggs"
	rm -rf "$(CURDIR)/.cache"
	# Generated files
	rm -f "$(CURDIR)/peachpy/x86_64/amd.py"
	rm -f "$(CURDIR)/peachpy/x86_64/avx.py"
	rm -f "$(CURDIR)/peachpy/x86_64/crypto.py"
	rm -f "$(CURDIR)/peachpy/x86_64/fma.py"
	rm -f "$(CURDIR)/peachpy/x86_64/generic.py"
	rm -f "$(CURDIR)/peachpy/x86_64/mask.py"
	rm -f "$(CURDIR)/peachpy/x86_64/mmxsse.py"

#override_dh_auto_test:
