#!/usr/bin/make -f

export PYBUILD_NAME=grip

export PYBUILD_TEST_PYTEST=1
export PYBUILD_BEFORE_TEST=cp {dir}/README.md {build_dir}
export PYBUILD_AFTER_TEST=rm -f {build_dir}/README.md

# pytest arguments:
#
# '-m "not assumption"' prevents external calls to GitHub API
# 'tests/test_cli.py' are functional tests not run at build time (DEP-8)
export PYBUILD_TEST_ARGS=-m "not assumption" --ignore=tests/test_cli.py


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


override_dh_auto_build:
	dh_auto_build
	txt2man -s 1 -t grip debian/docs/grip.txt > debian/grip.1

override_dh_auto_install:
	dh_auto_install
	# Remove auto-generated entry point script which wil be replaced by a
	# custom one
	rm debian/grip/usr/bin/grip
