#!/usr/bin/make -f

#DH_VERBOSE := 1

# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export HDF5_INCDIR=/usr/include/hdf5/serial
export HDF5_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial

export USE_NCCONFIG=1

export PYBUILD_TEST_CUSTOM=1
export PYBUILD_TEST_ARGS=cd test && NO_NET=1 NO_PLUGINS=1 {interpreter} run_all.py

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_test:
ifneq (,$(filter $(DEB_BUILD_ARCH),s390x hppa powerpc ppc64 sparc64))
	dh_auto_test || echo "Ignoring test failures"
else
	dh_auto_test
endif
