#!/usr/bin/make -f

export PYBUILD_DESTDIR_python2=debian/python-simplejson/
export PYBUILD_DESTDIR_python2-dbg=debian/python-simplejson-dbg/
export PYBUILD_DESTDIR_python3=debian/python3-simplejson/
export PYBUILD_DESTDIR_python3-dbg=debian/python3-simplejson-dbg/
PYTHONS=$(shell pyversions -vr)
PYTHON3S=$(shell py3versions -vr)


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

override_dh_auto_test:
	set -e && for pyvers in $(PYTHONS); do \
		python$$pyvers setup.py test; \
	done
	set -e && for pyvers in $(PYTHON3S); do \
		python$$pyvers setup.py test; \
	done

build-indep:
	dh_testdir
	dh_installdirs
	sphinx-build -N -q -E -b html . \
	 $(CURDIR)/debian/python-simplejson-doc/usr/share/doc/python-simplejson-doc/

override_dh_sphinxdoc:
	dh_sphinxdoc -p python-simplejson-doc
