Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package tree-sitter-python for 
openSUSE:Factory checked in at 2026-08-21 16:52:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tree-sitter-python (Old)
 and      /work/SRC/openSUSE:Factory/.tree-sitter-python.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tree-sitter-python"

Fri Aug 21 16:52:32 2026 rev:6 rq:1372196 version:0.23.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/tree-sitter-python/tree-sitter-python.changes    
2026-02-17 16:45:59.056005569 +0100
+++ 
/work/SRC/openSUSE:Factory/.tree-sitter-python.new.1258/tree-sitter-python.changes
  2026-08-21 16:53:36.225574139 +0200
@@ -1,0 +2,18 @@
+Thu Aug 20 09:01:03 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Ship the upstream Python binding as pythonXYZ flavor subpackages
+  via the shared %treesitter_python_install macro and the singlespec
+  python_subpackage_only template. The compiled _binding extension
+  is not built: the macro installs upstream's pure-Python package
+  files and generates a _binding.py that loads the grammar library
+  this package ships, so the parser is not compiled a second time
+  and no python devel/pip/wheel BuildRequires are needed.
+- The python subpackage pins the grammar package exactly and
+  Suggests python-tree-sitter >= 0.22 (the Language() capsule
+  constructor) instead of Requires, matching tree-sitter-bash,
+  so ring1 installcheck does not demand a non-ring package.
+- Run a functional %check parsing Python source through the shim;
+  gated to suse_version >= 1699 because python-tree-sitter does not
+  exist in Leap 16.0.
+
+-------------------------------------------------------------------

New:
----
  _scmsync.obsinfo
  build.specials.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tree-sitter-python.spec ++++++
--- /var/tmp/diff_new_pack.wuoKgg/_old  2026-08-21 16:53:36.941599609 +0200
+++ /var/tmp/diff_new_pack.wuoKgg/_new  2026-08-21 16:53:36.944599715 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package tree-sitter-python
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,7 @@
 #
 
 
+%define python_subpackage_only 1
 %define         _name python
 Name:           tree-sitter-python
 Version:        0.23.6
@@ -24,12 +25,30 @@
 License:        MIT
 URL:            https://github.com/tree-sitter/tree-sitter-python
 Source0:        %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+BuildRequires:  %{python_module base}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 BuildRequires:  tree-sitter
 %treesitter_grammars %{_name}
+%if 0%{?suse_version} >= 1699
+# Only for the functional test in %%check; python-tree-sitter does not
+# exist in Leap 16.0, and gating the test keeps that repo resolvable.
+BuildRequires:  %{python_module tree-sitter}
+%endif
+%python_subpackages
 
 %description
 %{summary}.
 
+%package -n python-%{name}
+Summary:        Python binding for the %{_name} tree-sitter grammar
+Requires:       %{name} = %{version}-%{release}
+Suggests:       python-tree-sitter >= 0.22
+
+%description -n python-%{name}
+Pure-Python module tree_sitter_%{_name} that loads the grammar library
+shipped in %{name} and exposes it to python-tree-sitter via language().
+
 %prep
 %autosetup
 
@@ -40,6 +59,20 @@
 %install
 %treesitter_install
 %treesitter_devel_install
+%treesitter_python_install
+
+%if 0%{?suse_version} >= 1699
+%check
+# The generated shim must point exactly at the library this package ships.
+test -f %{buildroot}%{_treesitter_grammardir}/libtree-sitter-%{_name}.so
+%{python_expand grep -Fq 
'%{_treesitter_grammardir}/libtree-sitter-%{_name}.so' 
%{buildroot}%{$python_sitearch}/tree_sitter_%{_name}/_binding.py}
+# Functional: parse real source through the shim. %%check runs unprivileged,
+# so the library cannot be placed at its real path; redirect the directory
+# constant to the build dir, where %%treesitter_build left the .so. -W error
+# also proves the supported capsule path is taken - the deprecated int path
+# would raise DeprecationWarning.
+%{python_expand rm -rf _tspy_check ; mkdir _tspy_check ; cp -pr 
%{buildroot}%{$python_sitearch}/tree_sitter_%{_name} _tspy_check/ ; rm -rf 
_tspy_check/tree_sitter_%{_name}/__pycache__ ; sed -i 
"s|%{_treesitter_grammardir}|$PWD|" 
_tspy_check/tree_sitter_%{_name}/_binding.py ; PYTHONPATH=$PWD/_tspy_check 
$python -W error::DeprecationWarning -c "import tree_sitter_%{_name} as tsg; 
from tree_sitter import Language, Parser; lang = Language(tsg.language()); tree 
= Parser(lang).parse(b'def f():\n    pass\n'); assert tree.root_node.type == 
'module', tree.root_node.type"}
+%endif
 
 %files
 %license LICENSE
@@ -47,3 +80,7 @@
 
 %treesitter_devel_package
 
+%files %{python_files %{name}}
+%license LICENSE
+%{python_sitearch}/tree_sitter_*
+

++++++ _scmsync.obsinfo ++++++
mtime: 1787216981
commit: 7ba73d93d9e73bdea2019d7c917f38f6fb85884c214101568a59d72868238cf6
url: https://src.opensuse.org/tree-sitter/tree-sitter-python
revision: 7ba73d93d9e73bdea2019d7c917f38f6fb85884c214101568a59d72868238cf6
projectscmsync: https://src.opensuse.org/tree-sitter/_ObsPrj

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-08-20 11:09:41.000000000 +0200
@@ -0,0 +1,4 @@
+*.obscpio
+*.osc
+_build.*
+.pbuild

Reply via email to