diff options
author | Alexandru Ardelean <alex@shruggie.ro> | 2024-01-15 07:40:25 +0200 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2024-02-08 09:40:01 -0800 |
commit | 62e42c9a97a3cd929194f85ba88381f59caaf54c (patch) | |
tree | 2b3d18fd812dce53b38414c57eb9989b458c99ee | |
parent | 641dfa1695d2b6ed3cf5a2f312e926cc988bbf1e (diff) |
python-lxml: bump to version 5.1.0
Also add a quick test.sh file.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
-rw-r--r-- | lang/python/python-lxml/Makefile | 4 | ||||
-rw-r--r-- | lang/python/python-lxml/test.sh | 31 |
2 files changed, 33 insertions, 2 deletions
diff --git a/lang/python/python-lxml/Makefile b/lang/python/python-lxml/Makefile index ae067b422..fd7939648 100644 --- a/lang/python/python-lxml/Makefile +++ b/lang/python/python-lxml/Makefile @@ -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 index 000000000..6ea15a0e8 --- /dev/null +++ b/lang/python/python-lxml/test.sh @@ -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 + |