diff --git a/lang/python/python-dbus-fast/Makefile b/lang/python/python-dbus-fast/Makefile index a0f653d33ea6ce..48b7524f630578 100644 --- a/lang/python/python-dbus-fast/Makefile +++ b/lang/python/python-dbus-fast/Makefile @@ -7,18 +7,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-dbus-fast -PKG_VERSION:=2.21.1 +PKG_VERSION:=4.0.4 PKG_RELEASE:=1 PYPI_NAME:=dbus-fast PYPI_SOURCE_NAME:=dbus_fast -PKG_HASH:=87b852d2005f1d59399ca51c5f3538f28a4742d739d7abe82b7ae8d01d8a5d02 +PKG_HASH:=43137f0b73a7adbf7d5c0e9eb9d8d34df9e6e0aeafade2166e641c52dfe0a853 PKG_MAINTAINER:=Quintin Hill PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DEPENDS:=python-poetry-core/host python-cython/host python-wheel/host +PKG_BUILD_DEPENDS:=python-poetry-core/host python-cython/host python-wheel/host python-setuptools/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk @@ -30,8 +30,7 @@ define Package/python3-dbus-fast SUBMENU:=Python TITLE:=A faster version of dbus-next URL:=https://github.com/Bluetooth-Devices/dbus-fast - DEPENDS:=+python3-light +python3-async-timeout +python3-asyncio \ - +python3-logging +python3-urllib +python3-xml + DEPENDS:=+python3-light +python3-xml +python3-asyncio +python3-logging endef define Package/python3-dbus-fast/description diff --git a/lang/python/python-dbus-fast/test.sh b/lang/python/python-dbus-fast/test.sh new file mode 100755 index 00000000000000..30ff408fb9396d --- /dev/null +++ b/lang/python/python-dbus-fast/test.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +[ "$1" = python3-dbus-fast ] || exit 0 + +PKG_VERSION="$2" + +python3 - "$PKG_VERSION" << 'EOF' +import sys +from dbus_fast.message import Message +from dbus_fast.constants import MessageType +from dbus_fast.signature import Variant +from dbus_fast.__version__ import __version__ + +assert __version__ == sys.argv[1], f"expected {sys.argv[1]}, got {__version__}" + +msg = Message( + message_type=MessageType.METHOD_CALL, + path="/org/example/Test", + interface="org.example.Test", + member="TestMethod", +) +assert msg.path == "/org/example/Test" +assert msg.interface == "org.example.Test" +assert msg.member == "TestMethod" + +v = Variant("s", "hello") +assert v.type.token == "s" +assert v.value == "hello" + +print("python3-dbus-fast OK") +EOF diff --git a/lang/python/python-pypubsub/Makefile b/lang/python/python-pypubsub/Makefile index eca43bf5c15881..ae7491d87c19a6 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 00000000000000..527a239fec32de --- /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 00000000000000..54b3c4074481ac --- /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 00000000000000..9b1eba5bb12b64 --- /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