From: Alexandru Ardelean Date: Tue, 24 Dec 2024 12:27:09 +0000 (+0200) Subject: python-et_xmlfile: bump to 2.0.0 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b24a5876d22f9c04c1463759492de00f280bd394;p=feed%2Fpackages.git python-et_xmlfile: bump to 2.0.0 Signed-off-by: Alexandru Ardelean --- diff --git a/lang/python/python-et_xmlfile/Makefile b/lang/python/python-et_xmlfile/Makefile index 10c04d004d..bc5457b2dd 100644 --- a/lang/python/python-et_xmlfile/Makefile +++ b/lang/python/python-et_xmlfile/Makefile @@ -6,14 +6,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-et_xmlfile -PKG_VERSION:=1.1.0 +PKG_VERSION:=2.0.0 PKG_RELEASE:=1 PKG_MAINTAINER:=Alexandru Ardelean , Eneas U de Queiroz PKG_LICENSE:=MIT PYPI_NAME:=et_xmlfile -PKG_HASH:=8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c +PKG_HASH:=dab3f4764309081ce75662649be815c4c9081e88f0837825f90fd28317d4da54 include ../pypi.mk include $(INCLUDE_DIR)/package.mk diff --git a/lang/python/python-et_xmlfile/test.sh b/lang/python/python-et_xmlfile/test.sh new file mode 100644 index 0000000000..cb4e5af266 --- /dev/null +++ b/lang/python/python-et_xmlfile/test.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +EXPECTED_VER="$2" + +python3 - << EOF + +import sys +from io import BytesIO +from xml.etree.ElementTree import Element + +from et_xmlfile import xmlfile + +if (et_xmlfile.__version__ != "$EXPECTED_VER"): + print("Invalid version obtained '" + et_xmlfile.__version__ + "'") + sys.exit(1) + +out = BytesIO() +with xmlfile(out) as xf: + el = Element("root") + xf.write(el) # write the XML straight to the file-like object + +if (out.getvalue() != b""): + print("Does not seem to work") + sys.exit(1) + +sys.exit(0) + +EOF +