diff --git a/lang/python/python-lxml/Makefile b/lang/python/python-lxml/Makefile index ae067b422b..fd79396481 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 0000000000..6ea15a0e8e --- /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''" +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 +