#!/usr/bin/make -f export PYBUILD_NAME=exabgp PYTHON3S:=$(shell py3versions -vr) %: dh $@ --with python3 --buildsystem=pybuild override_dh_auto_install: dh_auto_install --buildsystem=pybuild rm -rf $(CURDIR)/debian/python*-exabgp/usr/etc $(CURDIR)/debian/python*-exabgp/usr/share/exabgp mkdir -p $(CURDIR)/debian/python3-exabgp/usr/sbin mv $(CURDIR)/debian/python3-exabgp/usr/bin/exabgp $(CURDIR)/debian/python3-exabgp/usr/sbin/python3-exabgp mv $(CURDIR)/debian/python3-exabgp/usr/bin/exabgp-cli $(CURDIR)/debian/python3-exabgp/usr/sbin/python3-exabgp-cli # Let dh place the systemd unit. cp $(CURDIR)/etc/systemd/exabgp.service $(CURDIR)/debian/exabgp.service override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) set -e; set -x; for pyvers in $(PYTHON3S); do \ env INTERPRETER=python$$pyvers sbin/exabgp env > etc/exabgp/exabgp.env ; \ env INTERPRETER=python$$pyvers PYTHONPATH=./src exabgp_log_enable=false python$$pyvers -m pytest ./tests/unit/test_*.py ./tests/fuzz/test_*.py ; \ env INTERPRETER=python$$pyvers ./qa/bin/functional parsing ; \ done endif override_dh_auto_clean: dh_auto_clean --buildsystem=pybuild rm -f etc/exabgp/exabgp.env debian/exabgp.service