Update to 0.20.8.

This commit is contained in:
Troy Curtis Jr 2022-12-24 23:14:14 -05:00
commit 915ed3dd42
4 changed files with 68 additions and 32 deletions

View file

@ -1,54 +1,63 @@
%global srcname Levenshtein
Name: python-Levenshtein
%global forgeurl https://github.com/maxbachmann/%{srcname}
Version: 0.20.8
%forgemeta
Name: python-%{srcname}
Summary: Python extension computing string distances and similarities
Version: 0.12.0
Release: {autorelease}
Release: %{autorelease}
License: GPL-2.0-or-later
# The original site: http://trific.ath.cx/python/levenshtein/
# no longer exists so pointing to the pypi listing instead.
URL: http://pypi.python.org/pypi/%{name}/
# 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}
Source: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
BuildRequires: gcc
Source0: %{forgesource}
Patch0: levenshtein-0.20.8-cython-0.29.patch
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
BuildRequires: rapidfuzz-cpp-static
%description
%global _description %{expand:
Levenshtein computes Levenshtein distances, similarity ratios, generalized
medians and set medians of Strings and Unicodes. Because it's implemented
in C, it's much faster than corresponding Python library functions and
methods.
medians and set medians of Strings and Unicodes.}
%description %_description
%package -n python3-%{srcname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname}
Levenshtein computes Levenshtein distances, similarity ratios, generalized
medians and set medians of Strings and Unicodes. Because it's implemented
in C, it's much faster than corresponding Python 3 library functions and
methods.
Summary: %{summary}
%description -n python3-%{srcname} %_description
%prep
%setup -qn %{name}-%{version}
%autosetup -p1 -n %{srcname}-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%py3_build
%install
%py3_install
%pyproject_wheel
%files -n python3-%{srcname}
%doc README.rst NEWS
%install
%pyproject_install
%pyproject_save_files %{srcname}
%check
%pyproject_check_import
%pytest
%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.md
%license COPYING
%{python3_sitearch}/%{srcname}/
%{python3_sitearch}/python_%{srcname}-%{version}-py%{python3_version}.egg-info/
%changelog
{autochangelog}
%{autochangelog}