diff --git a/lang/python/python-eventlet/Makefile b/lang/python/python-eventlet/Makefile index e5534363de4bd..1016ef0c98422 100644 --- a/lang/python/python-eventlet/Makefile +++ b/lang/python/python-eventlet/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-eventlet -PKG_VERSION:=0.40.4 -PKG_RELEASE:=2 +PKG_VERSION:=0.41.0 +PKG_RELEASE:=1 PYPI_NAME:=eventlet -PKG_HASH:=69bef712b1be18b4930df6f0c495d2a882bf7b63aa111e7b6eeff461cfcaf26f +PKG_HASH:=35df85f0ccd3e73effb6fd9f1ceae46b500b966c7da1817289c323a307bd397b PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=MIT diff --git a/lang/python/python-paho-mqtt/Makefile b/lang/python/python-paho-mqtt/Makefile index 4028dc9cf81f4..4c4c16cb81925 100644 --- a/lang/python/python-paho-mqtt/Makefile +++ b/lang/python/python-paho-mqtt/Makefile @@ -5,15 +5,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-paho-mqtt -PKG_VERSION:=1.6.1 -PKG_RELEASE:=2 +PKG_VERSION:=2.1.0 +PKG_RELEASE:=1 PKG_MAINTAINER:=Josef Schlehofer , Alexandru Ardelean PKG_LICENSE:=EPL-2.0 Eclipse Distribution License v1.0 PKG_LICENSE_FILES:=epl-v20 edl-v10 LICENSE.txt PYPI_NAME:=paho-mqtt -PKG_HASH:=2a8291c81623aec00372b5a85558a372c747cbca8e9934dfe218638b8eefc26f +PYPI_SOURCE_NAME:=paho_mqtt +PKG_HASH:=12d6e7511d4137555a3f6ea167ae846af2c7357b10bc6fa4f7c3968fc1723834 + +PKG_BUILD_DEPENDS:=python-hatchling/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk @@ -25,7 +28,7 @@ define Package/python3-paho-mqtt SUBMENU:=Python TITLE:=MQTT version 5.0/3.1.1 client class URL:=http://eclipse.org/paho - DEPENDS:=+python3-light +python3-uuid + DEPENDS:=+python3-light +python3-uuid +python3-logging +python3-urllib endef define Package/python3-paho-mqtt/description diff --git a/lang/python/python-paho-mqtt/test.sh b/lang/python/python-paho-mqtt/test.sh new file mode 100644 index 0000000000000..2815fbc517b0a --- /dev/null +++ b/lang/python/python-paho-mqtt/test.sh @@ -0,0 +1,27 @@ +#!/bin/sh +[ "$1" = python3-paho-mqtt ] || exit 0 + +python3 - << 'EOF' +import paho.mqtt.client as mqtt + +# Verify version +assert hasattr(mqtt, '__version__') or hasattr(mqtt.Client, '__module__') + +# Test basic client instantiation +client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2) +assert client is not None + +# Test that the client has expected methods +assert callable(getattr(client, 'connect', None)) +assert callable(getattr(client, 'publish', None)) +assert callable(getattr(client, 'subscribe', None)) +assert callable(getattr(client, 'disconnect', None)) + +# Test MQTTMessage +msg = mqtt.MQTTMessage(topic=b'test/topic') +msg.payload = b'hello' +assert msg.topic == 'test/topic' +assert msg.payload == b'hello' + +print("paho-mqtt OK") +EOF diff --git a/lang/python/python-xmltodict/Makefile b/lang/python/python-xmltodict/Makefile index 87b841f51c1de..3ecc178c61365 100644 --- a/lang/python/python-xmltodict/Makefile +++ b/lang/python/python-xmltodict/Makefile @@ -8,16 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-xmltodict -PKG_VERSION:=0.13.0 +PKG_VERSION:=1.0.4 PKG_RELEASE:=1 PYPI_NAME:=xmltodict -PKG_HASH:=341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56 +PKG_HASH:=6d94c9f834dd9e44514162799d344d815a3a4faec913717a9ecbfa5be1bb8e61 PKG_MAINTAINER:=Josef Schlehofer PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_DEPENDS:=python-setuptools/host + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk diff --git a/lang/python/python-xmltodict/test.sh b/lang/python/python-xmltodict/test.sh new file mode 100644 index 0000000000000..b7aeb87d67cb7 --- /dev/null +++ b/lang/python/python-xmltodict/test.sh @@ -0,0 +1,29 @@ +#!/bin/sh +[ "$1" = python3-xmltodict ] || exit 0 + +python3 - << 'EOF' +import xmltodict + +# Basic XML to dict conversion +xml = """ + test + 42 + + a + b + +""" +data = xmltodict.parse(xml) +assert data['root']['name'] == 'test' +assert data['root']['value'] == '42' +assert isinstance(data['root']['items']['item'], list) +assert data['root']['items']['item'] == ['a', 'b'] + +# Dict to XML conversion +d = {'doc': {'title': 'Hello', 'body': 'World'}} +result = xmltodict.unparse(d) +assert 'Hello' in result +assert 'World' in result + +print("xmltodict OK") +EOF