diff mbox series

[bug#51314,v2,18/24] gnu: python-zeroconf: Update to 0.36.13.

Message ID 20211113200230.192559-18-monego@posteo.net
State New
Headers show
Series [bug#51314,v2,01/24] gnu: Add python-sarge. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego Nov. 13, 2021, 8:02 p.m. UTC
* gnu/packages/python-xyz.scm (python-zeroconf): Update to 0.36.13.
[source]: Fetch from GitHub.
[native-inputs]: Remove python-nose. Add python-pytest.
[arguments]<#:phases>: Adjust custom 'check phase to use Pytest.
---
 gnu/packages/python-xyz.scm | 36 +++++++++++++++++++++---------------
 1 file changed, 21 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 63325dfc90..b3990a6115 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23449,34 +23449,40 @@  enumeration library in Python.")
 (define-public python-zeroconf
   (package
     (name "python-zeroconf")
-    (version "0.28.8")
+    (version "0.36.13")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "zeroconf" version))
+       (method git-fetch)               ; no tests in PyPI release
+       (uri (git-reference
+             (url "https://github.com/jstasiak/python-zeroconf")
+             (commit version)))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
+        (base32 "1isz6jb14lmmqvzfgwkc8avyvib7pxpq92r2v283vjqjn7mmp0v9"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-nose" ,python-nose)))
+     `(("python-pytest" ,python-pytest)))
     (propagated-inputs
      `(("python-ifaddr" ,python-ifaddr)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _ ;; Networking isn't available for these tests.
-             (invoke "nosetests" "-v"
-                     "--exclude" "test_integration_with_listener_ipv6"
-                     "--exclude" "test_launch_and_close_v6_only"
-                     "--exclude" "test_launch_and_close_v4_v6"
-                     "--exclude" "test_launch_and_close"))))))
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest" "-k"
+                       (string-append
+                        ;; Networking isn't available for these tests.
+                        "not test_integration_with_listener_ipv6"
+                        " and not test_launch_and_close_v4_v6"
+                        " and not test_launch_and_close_context_manager"
+                        " and not test_launch_and_close"
+                        " and not test_close_multiple_times"))))))))
     (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).")
+    (description "Pure Python multicast DNS (mDNS) service discovery library
+(Bonjour/Avahi compatible).")
     (license license:lgpl2.1+)))
 
 (define-public python2-zeroconf