14
0
Files
python-rapidfuzz/python-rapidfuzz.spec
Steve Kowalik a61108e294 - Update to 3.13.0:
* add support for arrays of type 'w'
  * add support for any DTypeLike as dtype in ``cdist`` and ``cpdist``
  * upgrade to ``Cython==3.0.12``
  * generate code for fallback imports to be better parseable for tools
    bundling Python applications into a single binary
  * added support for taskflow 3.9.0
  * improve calculation of min score inside partial_ratio so it can skip
    more alignments
  * fix compilation on clang-19
  * fix incorrect results in simd optimized implementation of Levenshtein
    and OSA on 32bit targets
  * drop support for Python 3.8
  * switch build system to ``scikit-build-core``

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rapidfuzz?expand=0&rev=26
2025-07-15 04:50:19 +00:00

85 lines
2.4 KiB
RPMSpec

#
# spec file for package python-rapidfuzz
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-rapidfuzz
Version: 3.13.0
Release: 0
Summary: Rapid fuzzy string matching
License: MIT
URL: https://github.com/maxbachmann/RapidFuzz
Source: https://files.pythonhosted.org/packages/source/r/rapidfuzz/rapidfuzz-%{version}.tar.gz
BuildRequires: %{python_module Cython >= 3.0.12}
BuildRequires: %{python_module devel >= 3.9}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scikit-build-core >= 0.11}
BuildRequires: fdupes
BuildRequires: ninja
BuildRequires: python-rpm-macros
Suggests: python-numpy
%if 0%{?suse_version} < 1550
BuildRequires: gcc11-c++ >= 8
%else
BuildRequires: gcc-c++
%endif
%python_subpackages
%description
RapidFuzz is a fast string matching library for Python and C++, which is using
the string similarity calculations from FuzzyWuzzy.
%prep
%autosetup -p1 -n rapidfuzz-%{version}
%build
%if 0%{?suse_version} < 1550
export CXX=g++-11 CC=gcc-11
%endif
export CFLAGS="%{optflags} -fno-strict-aliasing"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
# remove devel file
%python_expand find %{buildroot} -type f -name "rapidfuzz.h" -delete -print
%check
# tests are a bit unstable
%ifarch x86_64
export skip_tests="not (hypothesis and test_cdist)"
%else
%ifarch %ix86
export skip_tests="not (hypothesis and test_jaro_winkler_word)"
%else
export skip_tests=""
%endif
%endif
%pytest_arch -k "$skip_tests"
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitearch}/rapidfuzz
%{python_sitearch}/rapidfuzz-%{version}.dist-info/
%changelog