gnu: python-dnspython: Patch out problematic getprotobyname calls.

* gnu/packages/python-xyz.scm (python-dnspython)
[phases]{patch-getprotobyname-calls}: New phase.
This commit is contained in:
Maxim Cournoyer 2021-11-22 11:02:07 -05:00
parent 07f078dbcf
commit e5ffff316f
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -15911,8 +15911,21 @@ (define-public python-dnspython
(base32
"1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
(build-system python-build-system)
(arguments
`(#:tests? #f ; XXX: requires internet access
#:phases
(modify-phases %standard-phases
(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 `(("unzip" ,unzip)))
(arguments '(#:tests? #f)) ; XXX: requires internet access
(home-page "https://www.dnspython.org")
(synopsis "DNS toolkit for Python")
(description