diff mbox series

[bug#36213,3/4] gnu: Add python2-zeroconf.

Message ID 73379ba3-f6d0-45a2-a49e-b2df8b937e62@www.fastmail.com
State Accepted
Headers show
Series Add pulseaudio-dlna | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Alex Griffin June 14, 2019, 7:27 p.m. UTC
This patch packages the last version of the zeroconf package to support python 2. That's also why I didn't package it for python 3, because it would be a substantially different package.
diff mbox series

Patch

From 37571b285637bce2ebd4a519360c81734c0a238a Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Thu, 13 Jun 2019 14:21:53 -0500
Subject: [PATCH 3/4] gnu: Add python2-zeroconf.

* gnu/packages/python-xyz.scm (python2-zeroconf): New variable.
---
 gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cceddf8f3b..23f1fe902d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15460,3 +15460,37 @@  by Igor Pavlov.")
 
 (define-public python2-pylzma
   (package-with-python2 python-pylzma))
+
+(define-public python2-zeroconf
+  (package
+    (name "python2-zeroconf")
+    (version "0.19.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "zeroconf" version))
+       (sha256
+        (base32
+         "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-requires
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "setup.py"
+               (("enum-compat")
+                "enum34"))
+             #t)))))
+    (native-inputs
+     `(("python2-six" ,python2-six)
+       ("python2-enum32" ,python2-enum34)
+       ("python2-netifaces" ,python2-netifaces)
+       ("python2-typing" ,python2-typing)))
+     (home-page "https://github.com/jstasiak/python-zeroconf")
+     (synopsis "Pure Python mDNS service discovery")
+     (description
+      "Pure Python multicast DNS (mDNS) service discovery library
+(Bonjour/Avahi compatible).")
+     (license license:lgpl2.1+)))
-- 
2.22.0