#!/usr/bin/make -f

#export DH_VERBOSE=1
export PYBUILD_NAME=django-ldapdb

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

override_dh_auto_test:
	# Explicitely enumerate tests to avoid import error when
	#  building with svn-buildpackage, where tests will be run
	#  inside folder that isn't a python module, like: ERROR:
	#  django-ldapdb-0.2.0.examples.tests
	#  (unittest2.loader.ModuleImportFailure) 
	# django-admin test --settings=settings --pythonpath=.
	django-admin test --settings=settings --pythonpath=. examples.tests ldapdb.tests

override_dh_installexamples:
	find examples/ -name '*.pyc' -exec rm {} \;
	dh_installexamples
