include $(TOPDIR)/rules.mk
PKG_NAME:=python-pypubsub
-PKG_VERSION:=4.0.3
-PKG_RELEASE:=2
+PKG_VERSION:=4.0.7
+PKG_RELEASE:=1
PYPI_NAME:=Pypubsub
PYPI_SOURCE_NAME:=pypubsub
-PKG_HASH:=32d662de3ade0fb0880da92df209c62a4803684de5ccb8d19421c92747a258c7
+PKG_HASH:=ec8b5cb147624958320e992602380cc5d0e4b36b1c59844d05e425a3003c09dc
-PKG_BUILD_DEPENDS:=python-setuptools/host
+PKG_BUILD_DEPENDS:=python-setuptools/host python-setuptools-scm/host
PKG_MAINTAINER:=Austin Lane <vidplace7@gmail.com>
PKG_LICENSE:=BSD-2-Clause
--- /dev/null
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools>=68,<77", "wheel", "setuptools-scm>=7"]
++requires = ["setuptools>=68", "wheel", "setuptools-scm>=7"]
+ build-backend = "setuptools.build_meta"
+
+ [project]
--- /dev/null
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -62,3 +62,4 @@ pubsub = ["LICENSE_BSD_Simple.txt", "REL
+
+ [tool.setuptools.packages.find]
+ where = ["src"]
++exclude = ["contrib*"]
--- /dev/null
+#!/bin/sh
+
+[ "$1" = python3-pypubsub ] || exit 0
+
+python3 - << 'EOF'
+from pubsub import pub
+
+received = []
+
+def on_message(msg):
+ received.append(msg)
+
+pub.subscribe(on_message, "test.topic")
+pub.sendMessage("test.topic", msg="hello")
+
+assert received == ["hello"], f"Expected ['hello'], got {received}"
+
+pub.unsubscribe(on_message, "test.topic")
+pub.sendMessage("test.topic", msg="world")
+assert received == ["hello"], "Unsubscribed listener should not receive messages"
+
+print("python3-pypubsub OK")
+EOF