python3-et_xmlfile: add python3-xml dep, fix test
authorAlexandru Ardelean <redacted>
Thu, 9 Apr 2026 06:19:46 +0000 (09:19 +0300)
committerAlexandru Ardelean <redacted>
Fri, 10 Apr 2026 11:01:09 +0000 (14:01 +0300)
The test.sh imports xml.etree.ElementTree from the stdlib, and
et_xmlfile itself falls back to stdlib xml when lxml is unavailable.
Add python3-xml to DEPENDS to ensure the xml module is present at
both install and test time.

The test used et_xmlfile.__version__ without importing the et_xmlfile
module (only 'from et_xmlfile import xmlfile' was present). Add
'import et_xmlfile' so the version check works correctly.

The test.sh lacked a package name guard, causing it to run (and fail)
when the -src subpackage was tested without python3 installed.
Add the standard guard to skip the test for non-main packages.

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-et_xmlfile/Makefile
lang/python/python-et_xmlfile/test.sh

index bc5457b2dda648a144795411224b0804773f3584..db9aab738d1b6e21645d5e5c5b4a1f4ed4dea4fe 100644 (file)
@@ -27,7 +27,8 @@ define Package/python3-et_xmlfile
   URL:=https://bitbucket.org/openpyxl/et_xmlfile
   DEPENDS:= \
        +python3-light \
-       +python3-lxml
+       +python3-lxml \
+       +python3-xml
 endef
 
 define Package/python3-et_xmlfile/description
index cb4e5af26697ef77800bdab137cf7f31088d298f..de87c666085245f5febe465f3e30dc442545abf7 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+[ "$1" = python3-et_xmlfile ] || exit 0
+
 EXPECTED_VER="$2"
 
 python3 - << EOF
@@ -8,6 +10,7 @@ import sys
 from io import BytesIO
 from xml.etree.ElementTree import Element
 
+import et_xmlfile
 from et_xmlfile import xmlfile
 
 if (et_xmlfile.__version__ != "$EXPECTED_VER"):
git clone https://git.99rst.org/PROJECT