mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 01:44:32 +04:00
python-et_xmlfile: bump to 2.0.0
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Alexandru Ardelean
parent
75b419e96c
commit
b24a5876d2
@@ -6,14 +6,14 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=python-et_xmlfile
|
PKG_NAME:=python-et_xmlfile
|
||||||
PKG_VERSION:=1.1.0
|
PKG_VERSION:=2.0.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Eneas U de Queiroz <cotequeiroz@gmail.com>
|
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Eneas U de Queiroz <cotequeiroz@gmail.com>
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|
||||||
PYPI_NAME:=et_xmlfile
|
PYPI_NAME:=et_xmlfile
|
||||||
PKG_HASH:=8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c
|
PKG_HASH:=dab3f4764309081ce75662649be815c4c9081e88f0837825f90fd28317d4da54
|
||||||
|
|
||||||
include ../pypi.mk
|
include ../pypi.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|||||||
29
lang/python/python-et_xmlfile/test.sh
Normal file
29
lang/python/python-et_xmlfile/test.sh
Normal file
@@ -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"<root />"):
|
||||||
|
print("Does not seem to work")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
Reference in New Issue
Block a user