[packages/tree-sitter-xml] - run python module load test

qboosh qboosh at pld-linux.org
Tue Jan 27 11:09:48 CET 2026


commit 56e01aa941a6973d1cc6cdf0fc4140c5d0b7128e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jan 27 11:09:57 2026 +0100

    - run python module load test

 tree-sitter-xml.spec | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/tree-sitter-xml.spec b/tree-sitter-xml.spec
index 4da0302..b3184a6 100644
--- a/tree-sitter-xml.spec
+++ b/tree-sitter-xml.spec
@@ -1,6 +1,7 @@
 #
 # Conditional build:
 %bcond_without	python3	# Python 3.x binding
+%bcond_without	tests	# Python binding load test
 
 Summary:	XML parser for tree-sitter
 Summary(pl.UTF-8):	Analizator formatu XML dla tree-sittera
@@ -20,6 +21,10 @@ BuildRequires:	gcc >= 6:4.7
 BuildRequires:	python3-devel >= 1:3.9
 BuildRequires:	python3-setuptools >= 1:42
 BuildRequires:	python3-wheel
+%if %{with tests}
+BuildRequires:	python3-tree-sitter >= 0.22
+%endif
+BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -96,6 +101,11 @@ Analizator formatu XML dla Pythona.
 
 %if %{with python3}
 %py3_build
+
+%if %{with tests}
+PYTHONPATH=$(readlink -f build-3/lib.*) \
+%{__python3} -m unittest discover -s bindings/python/tests
+%endif
 %endif
 
 %install
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tree-sitter-xml.git/commitdiff/56e01aa941a6973d1cc6cdf0fc4140c5d0b7128e



More information about the pld-cvs-commit mailing list