Sophie

Sophie

distrib > Mageia > 9 > x86_64 > by-pkgid > 6b7d7ae7b20f0a361c106fb6a8d904f9 > files > 2

python-levenshtein-0.20.5-2.mga9.src.rpm

%define oname Levenshtein

Summary:        Levenshtein Python extension and C library
Name:           python-levenshtein
Version:        0.20.5
Release:        %mkrel 2
License:        GPLv2+
Group:          Development/Python
Url:            https://github.com/ztane/python-Levenshtein
Source0:        https://files.pythonhosted.org/packages/8f/a5/42852d33ee0038b8e0bb2065208f95e1df05d9ccfac50ab728600a480498/Levenshtein-%{version}.tar.gz
# https://pypi.python.org/packages/source/p/%{oname}/%{oname}-%{version}.tar.gz
# Patch0:         python-levenshtein-0.12.0-linking.patch

%description
The Levenshtein Python C extension module contains functions for fast
computation of
- Levenshtein (edit) distance, and edit operations
- string similarity
- approximate median strings, and generally string averaging
- string sequence and set similarity
It supports both normal and Unicode strings.

%package -n python3-levenshtein
Group:          Development/Python
Summary:        Levenshtein Python 3 extension and C library
BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-scikit-build
BuildRequires:  cmake
BuildRequires:  ninja
BuildRequires:  pkgconfig(python3)
Provides:       python3-Levenshtein = %{version}-%{release}
%{?python_provide:%python_provide python3-levenshtein}
Provides:       python3.10dist(python-levenshtein) = %{version}-%{release}

%description -n python3-levenshtein
The Levenshtein Python 3 C extension module contains functions for fast
computation of
- Levenshtein (edit) distance, and edit operations
- string similarity
- approximate median strings, and generally string averaging
- string sequence and set similarity
It supports both normal and Unicode strings.

%prep
%autosetup -n %{oname}-%{version} -p1


%build
export LDFLAGS="$LDFLAGS -lpython3"
export CXXFLAGS="-g $CXXFLAGS"
%pyproject_wheel

%install
%pyproject_install

# https://github.com/ztane/python-Levenshtein/issues/20
rm -f %{buildroot}/%{python3_sitearch}/Levenshtein/_levenshtein.c
rm -f %{buildroot}/%{python3_sitearch}/Levenshtein/_levenshtein.h
# https://github.com/ztane/python-Levenshtein/issues/21
rm -f %{buildroot}/%{python3_sitearch}/Levenshtein/StringMatcher.py
rm -f %{buildroot}/%{python3_sitearch}/Levenshtein/__pycache__/StringMatcher.*

%files -n python3-levenshtein
%doc README.md HISTORY.md
%{python3_sitearch}/Levenshtein/*
%{python3_sitearch}/Levenshtein-%{version}.dist-info


%changelog
* Mon Oct 10 2022 papoteur <papoteur> 0.20.5-2.mga9
+ Revision: 1896076
- Add provides with previous name

* Sat Oct 08 2022 papoteur <papoteur> 0.20.5-1.mga9
+ Revision: 1895425
- new 0.20.5

* Fri Mar 18 2022 umeabot <umeabot> 0.12.0-11.mga9
+ Revision: 1799067
- Mageia 9 Mass Rebuild

* Mon Feb 14 2022 mrambo3501 <mrambo3501> 0.12.0-10.mga9
+ Revision: 1775205
- rebuild for python-3.10

* Tue Apr 20 2021 daviddavid <daviddavid> 0.12.0-9.mga9
+ Revision: 1717285
- rebuild for python 3.9

* Sun Feb 16 2020 umeabot <umeabot> 0.12.0-8.mga8
+ Revision: 1536670
- Mageia 8 Mass Rebuild

* Mon Oct 21 2019 daviddavid <daviddavid> 0.12.0-7.mga8
+ Revision: 1454911
- add patch to fix linking issue

* Sun Sep 15 2019 tv <tv> 0.12.0-6.mga8
+ Revision: 1441437
- rebuild for python-3.8
- drop python2 subpkg

* Tue Jan 08 2019 tv <tv> 0.12.0-5.mga7
+ Revision: 1351618
- rebuild with python 3.7

* Sun Sep 23 2018 umeabot <umeabot> 0.12.0-4.mga7
+ Revision: 1300517
- Mageia 7 Mass Rebuild

* Sat Aug 05 2017 pterjan <pterjan> 0.12.0-3.mga7
+ Revision: 1135481
- Rebuild for python 3.6

* Tue Feb 16 2016 umeabot <umeabot> 0.12.0-2.mga6
+ Revision: 962236
- Mageia 6 Mass Rebuild

* Sat Oct 31 2015 philippem <philippem> 0.12.0-1.mga6
+ Revision: 896959
- update to 0.12.0

* Sat Oct 10 2015 tv <tv> 0.11.2-6.mga6
+ Revision: 888939
- rebuild for python 3.5

* Wed Oct 15 2014 umeabot <umeabot> 0.11.2-5.mga5
+ Revision: 742012
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 0.11.2-4.mga5
+ Revision: 728949
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 0.11.2-3.mga5
+ Revision: 688121
- Mageia 5 Mass Rebuild

* Sat May 31 2014 pterjan <pterjan> 0.11.2-2.mga5
+ Revision: 628744
- Rebuild for new Python

* Fri Mar 07 2014 philippem <philippem> 0.11.2-1.mga5
+ Revision: 600889
- Update to 0.11.2

* Fri Dec 27 2013 philippem <philippem> 0.11.1-1.mga4
+ Revision: 560962
- Update to 0.11.1, add Python 3

* Tue Oct 22 2013 umeabot <umeabot> 0.10.1-6.mga4
+ Revision: 543753
- Mageia 4 Mass Rebuild

* Tue Oct 15 2013 pterjan <pterjan> 0.10.1-5.mga4
+ Revision: 498849
- Rebuild to add different pythonegg provides for python 2 and 3

* Sun Jan 13 2013 umeabot <umeabot> 0.10.1-4.mga3
+ Revision: 379042
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Apr 20 2011 dmorgan <dmorgan> 0.10.1-3.mga1
+ Revision: 88993
- imported package python-levenshtein
+ rtp <rtp>
- add missing -lm on link command line


* Sat Oct 30 2010 Ahmad Samir <ahmadsamir@mandriva.org> 0.10.1-2mdv2011.0
+ Revision: 590603
- rebuild for python-2.7
- drop obsolete %%py_requires macro and add python-devel as BR

* Thu May 21 2009 Jérôme Brenier <incubusss@mandriva.org> 0.10.1-1mdv2010.0
+ Revision: 378552
- fix doc
- import python-levenshtein