From bff9781478c71e513bbaeed06d1c92fe076b3bd4 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Thu, 16 Apr 2026 12:36:30 +0000 Subject: [PATCH] python-pypubsub: update to 4.0.7 - bump 4.0.3 -> 4.0.7 - add python-setuptools-scm/host to PKG_BUILD_DEPENDS - add test.sh Signed-off-by: Alexandru Ardelean --- lang/python/python-pypubsub/Makefile | 8 +++---- .../001-relax-setuptools-constraint.patch | 9 ++++++++ .../002-exclude-contrib-from-install.patch | 7 ++++++ lang/python/python-pypubsub/test.sh | 23 +++++++++++++++++++ 4 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 lang/python/python-pypubsub/patches/001-relax-setuptools-constraint.patch create mode 100644 lang/python/python-pypubsub/patches/002-exclude-contrib-from-install.patch create mode 100755 lang/python/python-pypubsub/test.sh diff --git a/lang/python/python-pypubsub/Makefile b/lang/python/python-pypubsub/Makefile index eca43bf5c1..ae7491d87c 100644 --- a/lang/python/python-pypubsub/Makefile +++ b/lang/python/python-pypubsub/Makefile @@ -5,14 +5,14 @@ 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 PKG_LICENSE:=BSD-2-Clause diff --git a/lang/python/python-pypubsub/patches/001-relax-setuptools-constraint.patch b/lang/python/python-pypubsub/patches/001-relax-setuptools-constraint.patch new file mode 100644 index 0000000000..527a239fec --- /dev/null +++ b/lang/python/python-pypubsub/patches/001-relax-setuptools-constraint.patch @@ -0,0 +1,9 @@ +--- 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] diff --git a/lang/python/python-pypubsub/patches/002-exclude-contrib-from-install.patch b/lang/python/python-pypubsub/patches/002-exclude-contrib-from-install.patch new file mode 100644 index 0000000000..54b3c40744 --- /dev/null +++ b/lang/python/python-pypubsub/patches/002-exclude-contrib-from-install.patch @@ -0,0 +1,7 @@ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -62,3 +62,4 @@ pubsub = ["LICENSE_BSD_Simple.txt", "REL + + [tool.setuptools.packages.find] + where = ["src"] ++exclude = ["contrib*"] diff --git a/lang/python/python-pypubsub/test.sh b/lang/python/python-pypubsub/test.sh new file mode 100755 index 0000000000..9b1eba5bb1 --- /dev/null +++ b/lang/python/python-pypubsub/test.sh @@ -0,0 +1,23 @@ +#!/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