#!/usr/bin/make -f

DH_VERBOSE := 1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export PYBUILD_NAME=pybedtools
export MATPLOTLIBRC=$(CURDIR)/debian/
# Add back test_issue_178 after upstream provided a patch https://github.com/daler/pybedtools/pull/228
export PYBUILD_TEST_ARGS=--attr '!url' # --exclude='(test_issue_178)'
export PYBUILD_BEFORE_TEST=cp {dir}/debian/mpl-expected.png {build_dir}/pybedtools/test/
export HOME=$(shell echo $$PWD"/fakehome")

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

override_dh_auto_build:
	dh_auto_build
	python3 setup.py develop --user
	python3 setup.py build_sphinx

override_dh_auto_install:
	dh_auto_install
	rm debian/python3-pybedtools/usr/lib/python3*/dist-packages/pybedtools/test/prevent_open_file_regression
