python-Levenshtein/python-Levenshtein.spec
2023-08-06 09:08:34 -04:00

63 lines
1.3 KiB
RPMSpec

%global srcname Levenshtein
%global forgeurl https://github.com/maxbachmann/%{srcname}
Version: 0.20.8
%forgemeta
Name: python-%{srcname}
Summary: Python extension computing string distances and similarities
Release: %{autorelease}
License: GPL-2.0-or-later
# Levenshtein is the latest name of the package, though the python-Levenshtein repo
# is still being kept up-to-date in lock-step to this official upstream.
URL: %{forgeurl}
Source0: %{forgesource}
Patch0: levenshtein-0.20.8-cython-0.29.patch
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: rapidfuzz-cpp-static
%global _description %{expand:
Levenshtein computes Levenshtein distances, similarity ratios, generalized
medians and set medians of Strings and Unicodes.}
%description %_description
%package -n python3-%{srcname}
Summary: %{summary}
%description -n python3-%{srcname} %_description
%prep
%autosetup -p1 -n %{srcname}-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files %{srcname}
%check
%pyproject_check_import
%pytest
%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.md
%license COPYING
%changelog
%{autochangelog}