Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export PYBUILD_NAME=exabgp
4
5 PYTHON3S:=$(shell py3versions -vr)
6
7 %:
8 dh $@ --with python3 --buildsystem=pybuild
9
10 override_dh_auto_install:
11 dh_auto_install --buildsystem=pybuild
12 rm -rf $(CURDIR)/debian/python*-exabgp/usr/etc $(CURDIR)/debian/python*-exabgp/usr/share/exabgp
13 mkdir -p $(CURDIR)/debian/python3-exabgp/usr/sbin
14 mv $(CURDIR)/debian/python3-exabgp/usr/bin/exabgp $(CURDIR)/debian/python3-exabgp/usr/sbin/python3-exabgp
15 mv $(CURDIR)/debian/python3-exabgp/usr/bin/exabgp-cli $(CURDIR)/debian/python3-exabgp/usr/sbin/python3-exabgp-cli
16 # Let dh place the systemd unit.
17 cp $(CURDIR)/etc/systemd/exabgp.service $(CURDIR)/debian/exabgp.service
18
19 override_dh_auto_test:
20 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
21 set -e; set -x; for pyvers in $(PYTHON3S); do \
22 env INTERPRETER=python$$pyvers sbin/exabgp env > etc/exabgp/exabgp.env ; \
23 env INTERPRETER=python$$pyvers PYTHONPATH=./src exabgp_log_enable=false python$$pyvers -m pytest ./tests/unit/test_*.py ./tests/fuzz/test_*.py ; \
24 env INTERPRETER=python$$pyvers ./qa/bin/functional parsing ; \
25 done
26 endif
27
28 override_dh_auto_clean:
29 dh_auto_clean --buildsystem=pybuild
30 rm -f etc/exabgp/exabgp.env debian/exabgp.service