File project.diff of Package python-jieba

--- python-jieba.changes.orig
+++ python-jieba.changes
@@ -1,4 +1,9 @@
 -------------------------------------------------------------------
+Fri Mar 27 16:46:46 UTC 2026 - Dirk Stoecker <opensuse@dstoecker.de>
+
+- update to 0.42.1
+
+-------------------------------------------------------------------
 Sat May 20 06:12:00 UTC 2017 - cges30901@gmail.com
 
 - update to version 0.38git20170406
--- python-jieba.spec.orig
+++ python-jieba.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package python-jieba
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# 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
@@ -12,51 +12,55 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-Name:           python-jieba
-Version:        0.38git20170406
+%{?sle15_python_module_pythons}
+%define pyname jieba
+Name:           python-%{pyname}
+Version:        0.42.1
 Release:        0
 Summary:        A Chinese word segmentation module in Python
 License:        MIT
 Group:          Development/Languages/Python
-Url:            https://github.com/fxsjy/jieba
-# Source: https://pypi.python.org/packages/source/j/jieba/jieba-0.31.zip
-# Chinese word segmentation is an ambiguous accuracy affair, old tarballs
-# just make situation even worse. So git please, but this one do have a pypi.
-Source:         %{name}-%{version}.tar.xz
-BuildRequires:  %{python_module devel }
-BuildRequires:  %{python_module setuptools }
+URL:            https://github.com/fxsjy/%{pyname}
+Source:         https://github.com/fxsjy/%{pyname}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+BuildRequires:  %{python_module base >= 3.10}
+BuildRequires:  %{python_module pip}
+#BuildRequires:  %%{python_module pytest}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildRequires:  xz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-%if !%{?sles_version}
 BuildArch:      noarch
-%endif
-
 %python_subpackages
 
 %description
-A Chinese word segmentation module in Python.
+“Jieba” (Chinese for “to stutter”) Chinese text segmentation: built to be the best
+Python Chinese word segmentation module.
 
 %prep
-%setup -q
+%autosetup -n %{pyname}-%{version}
+sed -i 's#/usr/bin/env python$#%{_bindir}/python3#' %{pyname}/analyse/textrank.py
+chmod 644 %{pyname}/*/__init__.py %{pyname}/*/tfidf.py
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
-%fdupes %{buildroot}%{_prefix}
+%pyproject_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%python_expand chmod 755 %{buildroot}%{$python_sitelib}/%{pyname}/analyse/textrank.py
+
+%check
+# Fails
+#%%pytest
 
 %files %{python_files}
-%defattr(-,root,root)
 %doc Changelog README.md LICENSE
-%{python_sitelib}/jieba/
-%{python_sitelib}/jieba-0.38-py%{py_ver}.egg-info
+%{python_sitelib}/%{pyname}
+%{python_sitelib}/%{pyname}-%{version}.dist-info
 
 %changelog
openSUSE Build Service is sponsored by