python-xmltodict: update to 1.0.4
authorAlexandru Ardelean <redacted>
Sat, 4 Apr 2026 22:31:59 +0000 (01:31 +0300)
committerAlexandru Ardelean <redacted>
Mon, 6 Apr 2026 05:29:13 +0000 (08:29 +0300)
Update package to 1.0.4.

Add test.sh to verify XML parsing and unparsing functionality.

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-xmltodict/Makefile
lang/python/python-xmltodict/test.sh [new file with mode: 0644]

index 87b841f51c1decf2ad9774230f01d92d1359a8fc..3ecc178c61365e98a6ff8c67c588b90657bea651 100644 (file)
@@ -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 <pepe.schlehofer@gmail.com>
 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 (file)
index 0000000..b7aeb87
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+[ "$1" = python3-xmltodict ] || exit 0
+
+python3 - << 'EOF'
+import xmltodict
+
+# Basic XML to dict conversion
+xml = """<root>
+    <name>test</name>
+    <value>42</value>
+    <items>
+        <item>a</item>
+        <item>b</item>
+    </items>
+</root>"""
+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 '<title>Hello</title>' in result
+assert '<body>World</body>' in result
+
+print("xmltodict OK")
+EOF
git clone https://git.99rst.org/PROJECT