mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 18:41:20 +00:00
python-lxml: bump to version 5.1.0
Also add a quick test.sh file. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Rosen Penev
parent
641dfa1695
commit
62e42c9a97
@@ -8,11 +8,11 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=python-lxml
|
PKG_NAME:=python-lxml
|
||||||
PKG_VERSION:=4.9.3
|
PKG_VERSION:=5.1.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PYPI_NAME:=lxml
|
PYPI_NAME:=lxml
|
||||||
PKG_HASH:=48628bd53a426c9eb9bc066a923acaa0878d1e86129fd5359aee99285f4eed9c
|
PKG_HASH:=3eea6ed6e6c918e468e693c41ef07f3c3acc310b70ddd9cc72d9ef84bc9564ca
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
PKG_LICENSE:=BSD-3-Clause
|
||||||
PKG_LICENSE_FILES:=LICENSES.txt
|
PKG_LICENSE_FILES:=LICENSES.txt
|
||||||
|
|||||||
31
lang/python/python-lxml/test.sh
Normal file
31
lang/python/python-lxml/test.sh
Normal file
@@ -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
|
||||||
|
|
||||||
Reference in New Issue
Block a user