From b1229e5b44d7120baa0a64cd4a5e4dab3a63c04a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 2 Jan 2025 22:58:59 +0100 Subject: [PATCH] gnu: python-dnspython-1.16: Add missing inputs. * gnu/packages/python-xyz.scm (python-dnspython-1.16)[arguments]: Add phase 'compatibility. [native-inputs]: Add python-pytest, python-setuptools, and python-wheel. Change-Id: I2d26d6607e4e376f204b790f14f38e067ebdc456 --- gnu/packages/python-xyz.scm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 08ba1622299f18efe449c2615343f67505b9cebd..146ec338bbc7c9f860d659a1cf8e4926c3c8abc5 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -23088,7 +23088,26 @@ It supports TSIG authenticated messages and EDNS0.") (sha256 (base32 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab")))) - (native-inputs '()))) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'compatibility + (lambda _ + (substitute* "dns/namedict.py" + (("collections.MutableMapping") + "collections.abc.MutableMapping")))) + (add-after 'unpack 'patch-getprotobyname-calls + ;; These calls are problematic in the build environment as there is + ;; no /etc/protocols. This breaks the sanity-check phase of any + ;; package depnding on this one. + (lambda _ + (substitute* "dns/rdtypes/IN/WKS.py" + (("socket.getprotobyname\\('tcp'\\)") + "6") + (("socket.getprotobyname\\('udp'\\)") + "17"))))))) + (native-inputs (list python-pytest python-setuptools python-wheel)))) (define-public python-py3dns (package