#! /usr/bin/make -f

export PYBUILD_NAME=asyncpg
export PYBUILD_TEST_ARGS=-s {build_dir}/tests
export PYBUILD_BUILD_ARGS=build_ext --cython-always
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
%:
	dh $@ --with python3 --buildsystem=pybuild

ifeq ($(DEB_BUILD_ARCH), $(filter $(DEB_BUILD_ARCH), armhf))
override_dh_auto_test:
endif

override_dh_auto_install:
	dh_auto_install
	find debian/python3-asyncpg/usr/lib \( -name '*.c' -or -name '*.h' -or -name '*.px[di]' -or -name '*.pyx' \) -delete
