## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Not packaged in Fedora: # python-distance %bcond distance 0 %global forgeurl https://github.com/orsinium/textdistance %global tag %{version} Name: python-textdistance Version: 4.6.3 Release: %autorelease Summary: Compute distance between the two texts %forgemeta # SPDX License: MIT URL: %{forgeurl} # The PyPI sdist lacks tests, so we must use the GitHub archive. Source: %{forgesource} BuildArch: noarch BuildRequires: python3-devel # For running tests in parallel: BuildRequires: %{py3_dist pytest-xdist} %global _description %{expand: TextDistance - python library for comparing distance between two or more sequences by many algorithms. Features: • 30+ algorithms • Pure python implementation • Simple usage • More than two sequences comparing • Some algorithms have more than one implementation in one class. • Optional numpy usage for maximum speed.} %description %{_description} %package -n python3-textdistance Summary: %{summary} %description -n python3-textdistance %{_description} # Both “common” and “extra” are equivalent to ”extras”, and are provided for # backward compatibility and to handle typos, respectively. %pyproject_extras_subpkg -n python3-textdistance extras common extra %pyproject_extras_subpkg -n python3-textdistance DamerauLevenshtein %if %{with distance} %pyproject_extras_subpkg -n python3-textdistance Hamming %endif %pyproject_extras_subpkg -n python3-textdistance Jaro %pyproject_extras_subpkg -n python3-textdistance JaroWinkler %pyproject_extras_subpkg -n python3-textdistance Levenshtein # We don’t choose to provide a metapackage for the “benchmark”/“benchmarks” # extra; besides missing dependencies, we think that it is akin to the “test” # and “lint” extras in not being intended for library *users*. %prep %forgeautosetup # This really doesn’t belong in the test extras! sed -r -i 's/^([[:blank:]]*)(.*\b(isort)\b)/\1# \2/' setup.py %generate_buildrequires %pyproject_buildrequires -x test,Jaro,JaroWinkler,Levenshtein %{pyproject_buildrequires \ -x extras -x common -x extra \ -x test \ -x DamerauLevenshtein \ %if %{with distance} -x Hamming \ %endif -x Jaro \ -x JaroWinkler \ -x Levenshtein} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l textdistance %check %if %{without distance} k="${k-}${k+ and }not test_compare[Hamming]" k="${k-}${k+ and }not test_compare[Levenshtein]" k="${k-}${k+ and }not test_list_of_numbers[Hamming]" k="${k-}${k+ and }not test_list_of_numbers[Levenshtein]" k="${k-}${k+ and }not test_qval[1-Hamming]" k="${k-}${k+ and }not test_qval[1-Levenshtein]" k="${k-}${k+ and }not test_qval[2-Hamming]" k="${k-}${k+ and }not test_qval[2-Levenshtein]" k="${k-}${k+ and }not test_qval[3-Hamming]" k="${k-}${k+ and }not test_qval[3-Levenshtein]" k="${k-}${k+ and }not test_qval[None-Hamming]" k="${k-}${k+ and }not test_qval[None-Levenshtein]" %endif %if %{without pdl} k="${k-}${k+ and }not test_compare[DamerauLevenshtein]" k="${k-}${k+ and }not test_list_of_numbers[DamerauLevenshtein]" k="${k-}${k+ and }not test_qval[1-DamerauLevenshtein]" k="${k-}${k+ and }not test_qval[2-DamerauLevenshtein]" k="${k-}${k+ and }not test_qval[3-DamerauLevenshtein]" k="${k-}${k+ and }not test_qval[None-DamerauLevenshtein]" %endif %pytest -v -k "${k-}" -n auto %files -n python3-textdistance -f %{pyproject_files} %doc README.md %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 4.6.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Tue Jul 16 2024 Packit - 4.6.3-1 - Update to 4.6.3 upstream release - Resolves: rhbz#2298094 * Sun Jun 09 2024 Python Maint - 4.6.2-3 - Rebuilt for Python 3.13 * Wed Apr 24 2024 Packit - 4.6.2-1 - Update to 4.6.2 upstream release - Resolves: rhbz#2276877 * Fri Jan 26 2024 Fedora Release Engineering - 4.6.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 4.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jan 04 2024 Benjamin A. Beasley - 4.6.1-2 - Assert that a license file is present in the .dist-info directory * Fri Dec 29 2023 Packit - 4.6.1-1 - [packit] 4.6.1 upstream release - Resolves rhbz#2256173 * Sun Oct 01 2023 Benjamin A. Beasley - 4.6.0-2 - Build extras that depend on python-pyxdameraulevenshtein * Thu Sep 28 2023 Benjamin A. Beasley - 4.6.0-1 - Update to 4.6.0 (close RHBZ#2241159) * Thu Sep 28 2023 Benjamin A. Beasley - 4.5.0-5 - Drop duplicate LICENSE file (pyproject_files handles it) * Wed Sep 27 2023 Benjamin A. Beasley - 4.5.0-4 - Add a packit config * Wed Sep 27 2023 Benjamin A. Beasley - 4.5.0-3 - Run tests in parallel * Wed Sep 27 2023 Benjamin A. Beasley - 4.5.0-2 - Replace deprecated license_file with license_files in setup.cfg * Wed Sep 27 2023 Benjamin A. Beasley - 4.5.0-1 - Update to 4.5.0 * Wed Sep 27 2023 Benjamin A. Beasley - 4.4.0-1 - Update to 4.4.0 * Wed Sep 27 2023 Benjamin A. Beasley - 4.3.0-1 - Update to 4.3.0 * Wed Sep 27 2023 Benjamin A. Beasley - 4.2.2-1 - Update to 4.2.2 - Two patches are now merged upstream * Wed Sep 27 2023 Benjamin A. Beasley - 4.2.1-1 - Update to 4.2.1 - README.rst is removed upstream in favor of README.md - We now package the GitHub archive instead of the PyPI sdist, since the latter no longer contains tests * Wed Sep 27 2023 Benjamin A. Beasley - 4.2.0-27 - Confirm License is SPDX MIT * Wed Sep 27 2023 Benjamin A. Beasley - 4.2.0-26 - Port to pyproject-rpm-macros - Add extras metapackages * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-25 - Package README.rst too, not just README.md * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-24 - Replace the executable-readme workaround with an upstream PR and patch * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-23 - Use the pytest macro to run tests * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-22 - Drop obsolete python_provide macro * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-21 - Don’t unnecessarily number sources and patches * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-20 - Reduce macro indirection in the spec file * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-19 - Stop using deprecated zero-argument version of pypi_source * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-18 - Fix leading blank lines in descriptions * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-17 - Nicer description formatting * Tue Sep 26 2023 Benjamin A. Beasley - 4.2.0-16 - Adjust whitespace and ordering for legibility * Tue Sep 26 2023 Sandro - 4.2.0-14 - Rebuild for RHBZ#2171687 (corrected bug#) * Tue Sep 26 2023 Sandro - 4.2.0-13 - Rebuild for RHBZ#2240745 * Fri Jul 21 2023 Fedora Release Engineering - 4.2.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jul 13 2023 Mamoru TASAKA - 4.2.0-11 - Backport upstream patch for numpy 1.24.x numpy.int removal - Backport upstream patch for test_jaro_winkler test fix * Thu Jun 15 2023 Python Maint - 4.2.0-10 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 4.2.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 4.2.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 4.2.0-7 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 4.2.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 4.2.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 4.2.0-4 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 4.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Dec 25 2020 Mukundan Ragavan - 4.2.0-2 - Fix directory ownership - run tests * Thu Dec 24 2020 Mukundan Ragavan - 4.2.0-1 - Initial package. ## END: Generated by rpmautospec