Subject: [PATCH] gnu: Add python-pypubsub.

From: Evgeny Pisemsky <[email-masked]>
Date: Mon, 27 Jan 2025 02:07:27 +0300

* gnu/packages/python-xyz.scm (python-pypubsub): New variable.

Change-Id: I543d8a6297c374e55809a755a902250ca4d270d9
---
 gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7fcf9c3ba8..ca1c39b697 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -116,7 +116,7 @@
 ;;; Copyright © 2021 Greg Hogan <[email-masked]>
 ;;; Copyright © 2022, 2023 John Kehayias <[email-masked]>
 ;;; Copyright © 2022 Aleksandr Vityazev <[email-masked]>
-;;; Copyright © 2022 Evgeny Pisemsky <[email-masked]>
+;;; Copyright © 2022, 2024, 2025 Evgeny Pisemsky <[email-masked]>
 ;;; Copyright © 2022 drozdov <[email-masked]>
 ;;; Copyright © 2022 Peter Polidoro <[email-masked]>
 ;;; Copyright © 2022, 2023 Wamm K. D. <[email-masked]>
@@ -157,7 +157,6 @@
 ;;; Copyright © 2024 Rick Huijzer <[email-masked]>
 ;;; Copyright © 2024 Peter Kannewitz <[email-masked]>
 ;;; Copyright © 2024 Aaron Covrig <[email-masked]>
-;;; Copyright © 2024, 2025 Evgeny Pisemsky <[email-masked]>
 ;;; Copyright © 2024 Markku Korkeala <[email-masked]>
 ;;; Copyright © 2025 Jordan Moore <[email-masked]>
 ;;; Copyright © 2025 Dariqq <[email-masked]>
@@ -38277,6 +38276,39 @@ (define-public python-pyee
 and threaded programming in python, such as async/await.")
     (license license:expat)))
 
+(define-public python-pypubsub
+  (package
+    (name "python-pypubsub")
+    (version "4.0.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/schollii/pypubsub")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "02j74w28wzmdvxkk8i561ywjgizjifq3hgcl080yj0rvkd3wivlb"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (replace 'check
+                     (lambda* (#:key tests? #:allow-other-keys)
+                       (when tests?
+                         (with-directory-excursion "tests/suite"
+                           (invoke "py.test"))))))))
+    (native-inputs (list python-pytest python-setuptools python-wheel))
+    (home-page "https://github.com/schollii/pypubsub")
+    (synopsis "Python publish-subcribe library")
+    (description
+     "This library provides a publish-subscribe API to facilitate
+event-based or message-based architecture in a single-process
+application.  It is centered on the notion of a topic - senders
+publish messages of a given topic, and listeners subscribe to messages
+of a given topic, all inside the same process.")
+    (license license:bsd-2)))
+
 (define-public python-queuelib
   (package
     (name "python-queuelib")

base-commit: 2ef62487045e8c10870f9105b841d66838476c37
-- 
2.47.1