Update to 0.20.8.

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

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
python-Levenshtein-0.10.1.tar.bz2
/python-Levenshtein-0.12.0.tar.gz
/Levenshtein-0.20.8.tar.gz

View file

@ -0,0 +1,26 @@
diff --git a/_custom_build/backend.py b/_custom_build/backend.py
index 08c3c06..43b0b22 100644
--- a/_custom_build/backend.py
+++ b/_custom_build/backend.py
@@ -36,7 +36,7 @@ def _ninja_required():
return True
-def get_requires_for_build_wheel(self, config_settings=None):
+def get_requires_for_build_wheel(config_settings=None):
packages = []
if _cmake_required():
packages.append('cmake')
diff --git a/pyproject.toml b/pyproject.toml
index 88df1c3..8ff41bb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -2,7 +2,7 @@
requires = [
"setuptools",
"scikit-build>=0.13.0",
- "Cython>=3.0.0a11"
+ "Cython>=0.29.26"
]
build-backend = "backend"
backend-path = ["_custom_build"]

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}

View file

@ -1 +1 @@
e8cde197d6d304bbdc3adae66fec99fb python-Levenshtein-0.12.0.tar.gz
SHA512 (Levenshtein-0.20.8.tar.gz) = 3a248b5d1a18c8afeffaa637c831b07266dd36a094b713c18b7182a49de7df9a3b7316d00e9329e2ae49f92c601e32a61590338e30a7e4f33ffe0d76c6219061