rekado pushed a commit to branch python-team
in repository guix.

commit 5468829cca8c965b0522767d46688dd452d18916
Author: Ricardo Wurmus <[email protected]>
AuthorDate: Fri Dec 20 22:36:39 2024 +0100

    gnu: Add python-girc.
    
    * gnu/packages/irc.scm (python-girc): New variable.
    
    Change-Id: I81be23985e59a18819ba2202e1689c84bdb10d08
---
 gnu/packages/irc.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index de101934ac..d6b8cf4b4b 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <[email protected]>
 ;;; Copyright © 2024 Ashish SHUKLA <[email protected]>
 ;;; Copyright © 2024 Christian Miller <[email protected]>
+;;; Copyright © 2024 Ricardo Wurmus <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -97,6 +98,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages prometheus)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages regex)
@@ -810,6 +812,43 @@ interface for those who are accustomed to the ircII way of 
doing things.")
                    ;; distribute binaries.
                    (license:non-copyleft "http://epicsol.org/copyright";)))))
 
+(define-public python-girc
+  (package
+    (name "python-girc")
+    (version "0.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "girc" version))
+       (sha256
+        (base32 "0gbx64j8782m1x2w9dkiynvshj43m0y4i0xnsiz0gsmyfl0jk8jl"))
+       (snippet
+        #~(begin (use-modules (guix build utils))
+                 (substitute* '("girc/utils.py"
+                                "girc/imapping.py")
+                   (("collections.MutableSequence")
+                    "collections.abc.MutableSequence")
+                   (("collections.MutableMapping")
+                    "collections.abc.MutableMapping")
+                   (("collections.Mapping")
+                    "collections.abc.Mapping"))))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      '(modify-phases %standard-phases
+         (add-after 'unpack 'delete-some-tests
+           ;; This file depends on python-irc-parser-tests, which depends on
+           ;; this package.
+           (lambda _ (delete-file "tests/test_parse.py"))))))
+    (propagated-inputs (list python-docopt))
+    (native-inputs (list python-setuptools python-wheel))
+    (home-page "https://github.com/DanielOaks/girc";)
+    (synopsis "IRC library for Python")
+    (description
+     "This package provides an IRC library for Python, based on asyncio.")
+    (license license:isc)))
+
 (define-public python-irc-parser-tests
   (package
     (name "python-irc-parser-tests")

Reply via email to