From e2d0a034929cc1f92ec3d7f7c43f1eddc452ae70c23ddd56d980f0cb75f84140 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 6 Jul 2024 18:36:22 +0000 Subject: [PATCH] - update to 3.9.4: * fix bug in Levenshtein.editops and Levenshtein.opcodes which could lead to incorrect results and crashes for some inputs * fix None handling for queries in process.cdist for scorers not supporting SIMD * fix supported versions of taskflow in cmake to be in the range v3.3 - v3.7 * disable AVX2 on MacOS since it did lead to illegal instructions being generated * significantly improve type hints for the library * fix cmake version parsing * use the correct version of rapidfuzz-cpp when building against a system installed version * added process.cpdist which allows pairwise comparison of two collection of inputs * fix some minor errors in the type hints * fix potentially incorrect results of JaroWinkler when using high prefix weights OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rapidfuzz?expand=0&rev=22 --- .gitattributes | 23 ++++++ .gitignore | 1 + python-rapidfuzz.changes | 160 +++++++++++++++++++++++++++++++++++++++ python-rapidfuzz.spec | 86 +++++++++++++++++++++ rapidfuzz-3.7.0.tar.gz | 3 + rapidfuzz-3.9.4.tar.gz | 3 + 6 files changed, 276 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-rapidfuzz.changes create mode 100644 python-rapidfuzz.spec create mode 100644 rapidfuzz-3.7.0.tar.gz create mode 100644 rapidfuzz-3.9.4.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-rapidfuzz.changes b/python-rapidfuzz.changes new file mode 100644 index 0000000..9b55271 --- /dev/null +++ b/python-rapidfuzz.changes @@ -0,0 +1,160 @@ +------------------------------------------------------------------- +Sat Jul 6 18:31:21 UTC 2024 - Dirk Müller + +- update to 3.9.4: + * fix bug in Levenshtein.editops and Levenshtein.opcodes which + could lead to incorrect results and crashes for some inputs + * fix None handling for queries in process.cdist for scorers + not supporting SIMD + * fix supported versions of taskflow in cmake to be in the + range v3.3 - v3.7 + * disable AVX2 on MacOS since it did lead to illegal + instructions being generated + * significantly improve type hints for the library + * fix cmake version parsing + * use the correct version of rapidfuzz-cpp when building + against a system installed version + * added process.cpdist which allows pairwise comparison of two + collection of inputs + * fix some minor errors in the type hints + * fix potentially incorrect results of JaroWinkler when using + high prefix weights + +------------------------------------------------------------------- +Sat Apr 6 12:11:45 UTC 2024 - Dirk Müller + +- update to 3.7.0: + * reduce importtime + +------------------------------------------------------------------- +Wed Mar 13 19:02:16 UTC 2024 - Dirk Müller + +- update to 3.6.2: + * upgrade rapidfuzz-cpp which includes a fix for build issues + on some compilers + * fix some issues with the sphinx config + +------------------------------------------------------------------- +Sun Jan 21 10:46:47 UTC 2024 - Dirk Müller + +- update to 3.6.1: + * fix overflow error on systems with ``sizeof(size_t) < 8`` + * fix pure python fallback implementation of ``fuzz.token_set_ratio`` + * properly link with ``-latomic`` if ``std::atomic`` + is not natively supported + * add banded implementation of LCS / Indel. This improves the + runtime from ``O((|s1|/64) * |s2|)`` to + ``O((score_cutoff/64) * |s2|)`` + * upgrade to ``Cython==3.0.7`` + * cdist for many metrics now returns a matrix of ``uint32`` + instead of ``int32`` by default + +------------------------------------------------------------------- +Wed Dec 27 16:06:20 UTC 2023 - Dirk Müller + +- update to 3.5.2: + * skip pandas ``pd.NA`` similar to ``None`` + * add ``score_multiplier`` argument to ``process.cdist`` which + allows multiplying the end result scores + * with a constant factor. + * drop support for Python 3.7 + * improve performance of simd implementation for ``LCS`` / + ``Indel`` / ``Jaro`` / ``JaroWinkler`` + * improve performance of Jaro and Jaro Winkler for long + sequences + * implement ``process.extract`` with ``limit=1`` using + ``process.extractOne`` which can be faster + * the preprocessing function was always called through Python + due to a broken C-API version check + * fix wraparound issue in simd implementation of Jaro and Jaro + Winkler + * upgrade to ``Cython==3.0.3`` + * add simd implementation for Jaro and Jaro Winkler + * add missing tag for python 3.12 support + * upgrade to ``Cython==3.0.2`` + * implement the remaining missing features from the C++ + implementation in the pure Python implementation + * added support for Python 3.12 + * build x86 with sse2/avx2 runtime detection + * upgrade to ``taskflow==3.6`` + * added keyword argument ``pad`` to Hamming distance. This + controls whether sequences of different + * length should be padded or lead to a ``ValueError`` + * improve consistency of exception messages between the C++ and + pure Python implementation + * upgrade required Cython version to ``Cython==3.0.0b3`` + * allow the usage of ``Hamming`` for different string lengths. + Length differences are handled as insertions / deletions + * remove support for boolean preprocessor functions in + ``rapidfuzz.fuzz`` and ``rapidfuzz.process``. + * The processor argument is now always a callable or ``None``. + * update defaults of the processor argument to be ``None`` + everywhere. For affected functions this can change results, + since strings are no longer preprocessed. + * fix incorrect tag dispatching implementation leading to AVX2 + instructions in the SSE2 code path + * add wheels for windows arm64 + * allow the usage of finite generators as choices in + ``process.extract`` + * fix handling of non symmetric scorers in pure python version + of ``process.cdist`` + * fix default dtype handling when using ``process.cdist`` with + pure python scorers + +------------------------------------------------------------------- +Fri Dec 1 17:57:05 UTC 2023 - Antonio Larrosa + +- Do not buildrequire PyInstaller nor pandas which aren't used + +------------------------------------------------------------------- +Wed May 31 08:28:24 UTC 2023 - Johannes Kastl + +- do not use glob for dist-info directory name + +------------------------------------------------------------------- +Mon May 8 07:08:50 UTC 2023 - Johannes Kastl + +- add sle15_python_module_pythons + +------------------------------------------------------------------- +Mon Feb 27 12:26:01 UTC 2023 - Matej Cepl + +- Clean up the SPEC file. + +------------------------------------------------------------------- +Fri Feb 24 12:52:39 UTC 2023 - Torsten Gruner + +- update to version 2.13.7 + * fix function signature of get_requires_for_build_wheel + +------------------------------------------------------------------- +Sat Dec 17 22:35:21 UTC 2022 - Torsten Gruner + +- update to version 2.13.6 + * Changed + + reformat changelog as restructured text to get rig of m2r2 dependency +- version 2.13.5 + * Added + + added docs to sdist + * Fixed + + fix two cases of undefined behavior in process.cdist +- version 2.13.4 + * Changed + + handle float("nan") similar to None for query / choice, since this is + common for non-existent data in tools like numpy + * Fixed + + fix handling on None/float("nan") in process.distance + + use absolute imports inside tests +- version 2.13.3 + * Fixed + + improve handling of functions wrapped using functools.wraps + + fix broken fallback to Python implementation when the a ImportError occurs on import. + This can e.g. occur when the binary has a dependency on libatomic, but it + is unavailable on the system + + define CMAKE_C_COMPILER_AR/CMAKE_CXX_COMPILER_AR/CMAKE_C_COMPILER_RANLIB/CMAKE_CXX_COMPILER_RANLIB + if they are not defined yet + +------------------------------------------------------------------- +Thu Oct 27 10:03:58 UTC 2022 - Markéta Machová + +- initial packaging (v2.13.2), dependency of weblate diff --git a/python-rapidfuzz.spec b/python-rapidfuzz.spec new file mode 100644 index 0000000..04cb85c --- /dev/null +++ b/python-rapidfuzz.spec @@ -0,0 +1,86 @@ +# +# spec file for package python-rapidfuzz +# +# Copyright (c) 2024 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.9.4 +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} +BuildRequires: %{python_module devel >= 3.7} +BuildRequires: %{python_module hypothesis} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module scikit-build} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools} +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 diff --git a/rapidfuzz-3.7.0.tar.gz b/rapidfuzz-3.7.0.tar.gz new file mode 100644 index 0000000..22babab --- /dev/null +++ b/rapidfuzz-3.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:620df112c39c6d27316dc1e22046dc0382d6d91fd60d7c51bd41ca0333d867e9 +size 1569549 diff --git a/rapidfuzz-3.9.4.tar.gz b/rapidfuzz-3.9.4.tar.gz new file mode 100644 index 0000000..653cc0d --- /dev/null +++ b/rapidfuzz-3.9.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:366bf8947b84e37f2f4cf31aaf5f37c39f620d8c0eddb8b633e6ba0129ca4a0a +size 1595863