#! /usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export PYBUILD_NAME=wordcloud
export PYBUILD_AFTER_INSTALL = \
  dh_link /usr/share/texlive/texmf-dist/fonts/truetype/ascender/droid/droidsansmono/DroidSansMono.ttf {install_dir}/$(PYBUILD_NAME)/DroidSansMono.ttf


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

override_dh_auto_clean:
	set -ex; \
	if [ -e "${CURDIR}/wordcloud/query_integral_image.c" ]; then \
		rm "${CURDIR}/wordcloud/query_integral_image.c"; \
	fi

override_dh_auto_configure:
	dh_auto_configure
	cython3 wordcloud/*.pyx

# skip tests when building, depends on autopkgtest
override_dh_auto_test:
