summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 17:45:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 17:45:10 +0000
commit8ffdcdb6f6cd595c9efedd0d02e351e88c19147b (patch)
treee12756d71ec73654e58151fd2872cfc50456d5e0 /debian/rules
parentAdding upstream version 0.10.1. (diff)
downloadpython-netaddr-debian.tar.xz
python-netaddr-debian.zip
Adding debian version 0.10.1-1.debian/0.10.1-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/rules29
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..cbf6dc7
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,29 @@
+#!/usr/bin/make -f
+# -*- mode: makefile; coding: utf-8 -*-
+
+export PYBUILD_NAME=netaddr
+export LC_ALL=C.UTF-8
+
+%:
+ dh $@ --with python3 --buildsystem=pybuild
+
+# Replace EUI files with the appropriate symlinks
+override_dh_link: dh_link/python3-netaddr
+ dh_link
+python_module_path=usr/lib/python*/dist-packages
+dh_link/python3-netaddr:
+ rm debian/$(@:dh_link/%=%)/$(python_module_path)/netaddr/eui/iab.*
+ rm debian/$(@:dh_link/%=%)/$(python_module_path)/netaddr/eui/oui.*
+ ln -s /var/lib/ieee-data/oui.txt debian/$(@:dh_link/%=%)/$(python_module_path)/netaddr/eui/
+ ln -s /var/lib/ieee-data/iab.txt debian/$(@:dh_link/%=%)/$(python_module_path)/netaddr/eui/
+ PYTHONPATH=$(CURDIR) python3 \
+ debian/$(@:dh_link/%=%)/$(python_module_path)/netaddr/eui/ieee.py
+
+override_dh_python3:
+ dh_python3 --shebang=/usr/bin/python3
+
+# Tests
+override_dh_auto_test:
+ localehelper LANG=en_US.UTF-8 dh_auto_test -- \
+ --system=custom \
+ --test-args='{interpreter} -m pytest netaddr/tests -v'