#!/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 PYBUILD_NAME=snakemake
export PYBUILD_DESTDIR_python3=debian/snakemake
export PYBUILD_BEFORE_TEST_python3=chmod +x {dir}/bin/snakemake; cp -r {dir}/bin {dir}/tests {build_dir}
export PYBUILD_AFTER_TEST_python3=rm -fr {build_dir}/bin {build_dir}/tests

export PATH:=$(CURDIR)/.pybuild/pythonX.Y_3.5/build/bin:$(PATH)

# Force the use of python3's sphinx-build.
export SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build

# main packaging script based on dh7 syntax
%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	python3 setup.py build_sphinx

get-orig-source:
	uscan --verbose --force-download --repack --compression xz
