#!/usr/bin/make -f

export PYBUILD_NAME=geoalchemy2
%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(eval BUILD_DIR=$(shell pybuild --print '{build_dir}'))
	cp -r tests $(BUILD_DIR)
	python3 $(CURDIR)/debian/tests/setup-db-and-run-tests.py
endif
