#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
export LC_ALL=C.UTF-8

export PYBUILD_NAME=cyvcf2

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

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

override_dh_install:
	dh_numpy3
	dh_install

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test
	# clean up after testing
	find . -name out.vcf -delete
endif

# If you need to rebuild the Sphinx documentation
# Add spinxdoc to the dh --with line
#override_dh_auto_build:
#	dh_auto_build
#	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml        docs/ build/html # HTML generator
#	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bman        docs/ build/man # Manpage generator

override_dh_clean:
	dh_clean
	rm -rf cyvcf2.egg-info cyvcf2/cyvcf2.c __o.vcf
	find . -name "*.so" -delete
