#!/usr/bin/make -f
export PYBUILD_NAME=pyres
export PYBUILD_TEST_PYTEST=1
export PYBUILD_BEFORE_TEST=cp -R {dir}/tests {build_dir} ; redis-server > /dev/null &
export PYBUILD_AFTER_TEST=rm -fR {build_dir}/tests ; redis-cli shutdown
export PYBUILD_TEST_ARGS=-k 'not test_worker_pids'

%:
	dh $@ --with python2,systemd --buildsystem=pybuild

override_dh_clean:
	rm -rf pyres.egg-info .cache dump.rdb
	dh_clean

override_dh_installinit:
	dh_installinit --name=pyres_manager@ --noscripts
	dh_installinit --name=pyres_scheduler@ --noscripts
	dh_installinit --name=pyres_worker@ --noscripts
