python-lxml: bump to version 5.1.0
authorAlexandru Ardelean <alex@shruggie.ro>
Mon, 15 Jan 2024 05:40:25 +0000 (07:40 +0200)
committerRosen Penev <rosenp@gmail.com>
Thu, 8 Feb 2024 17:40:01 +0000 (09:40 -0800)
Also add a quick test.sh file.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
lang/python/python-lxml/Makefile
lang/python/python-lxml/test.sh [new file with mode: 0644]

index ae067b422ba817166cf0e2491ae6a39412eae5a4..fd7939648141312db58104b6578c1428fae8f7fc 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-lxml
-PKG_VERSION:=4.9.3
+PKG_VERSION:=5.1.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=lxml
-PKG_HASH:=48628bd53a426c9eb9bc066a923acaa0878d1e86129fd5359aee99285f4eed9c
+PKG_HASH:=3eea6ed6e6c918e468e693c41ef07f3c3acc310b70ddd9cc72d9ef84bc9564ca
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSES.txt
diff --git a/lang/python/python-lxml/test.sh b/lang/python/python-lxml/test.sh
new file mode 100644 (file)
index 0000000..6ea15a0
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+[ "$1" = "python3-lxml" ] || exit 0
+
+EXP_VER="$2"
+
+python3 - << EOF
+import lxml
+import sys
+
+if (lxml.__version__) != "$EXP_VER":
+    print("Wrong version: " + lxml.__version__)
+    sys.exit(1)
+
+from lxml import etree
+
+root = etree.Element("root")
+root.append(etree.Element("child1"))
+root.append(etree.Element("child2"))
+root.append(etree.Element("child3"))
+
+exp_str = "b'<root><child1/><child2/><child3/></root>'"
+got_str = str(etree.tostring(root))
+if (got_str != exp_str):
+    print("Expected: '" + exp_str + "' . Got: '" + got_str + "'")
+else:
+    print("OK")
+
+sys.exit(0)
+EOF
+