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

qboosh qboosh at pld-linux.org
Tue Jan 27 11:46:13 CET 2026


commit e742d3b2bf247996ffa05580e59b33e7ca7869b4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jan 27 11:46:21 2026 +0100

    - run python module load test

 tree-sitter-go.spec | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/tree-sitter-go.spec b/tree-sitter-go.spec
index f0703f7..c3db5fa 100644
--- a/tree-sitter-go.spec
+++ b/tree-sitter-go.spec
@@ -1,6 +1,7 @@
 #
 # Conditional build:
 %bcond_without	python3	# Python 3.x binding
+%bcond_without	tests	# Python binding load test
 
 Summary:	Go grammar for tree-sitter
 Summary(pl.UTF-8):	Gramatyka języka Go dla tree-sittera
@@ -19,6 +20,10 @@ BuildRequires:	gcc >= 6:4.7
 BuildRequires:	python3-devel >= 1:3.10
 BuildRequires:	python3-setuptools >= 1:62.4.0
 BuildRequires:	python3-wheel
+%if %{with tests}
+BuildRequires:	python3-tree-sitter >= 0.24
+%endif
+BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -94,6 +99,11 @@ Analizator składni języka Go 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-go.git/commitdiff/e742d3b2bf247996ffa05580e59b33e7ca7869b4



More information about the pld-cvs-commit mailing list