24f47db
%global realname jellyfish
24f47db
# Share doc between python-jellyfish and python3-jellyfish
24f47db
%global _docdir_fmt %{name}
24f47db
24f47db
Name:           python-%{realname}
295eb3c
Version:        0.8.4
fcbda35
Release:        6%{?dist}
24f47db
Summary:        A python library for doing approximate and phonetic matching of strings
24f47db
24f47db
License:        BSD
24f47db
URL:            https://github.com/jamesturk/%{realname}
295eb3c
Source0:        https://github.com/jamesturk/%{realname}/archive/v%{version}.tar.gz
e848a4b
# git repo is here https://github.com/jamesturk/jellyfish-testdata.git
e848a4b
# tgz created with: git archive HEAD -o jellyfish-testdata-20160204.tgz
295eb3c
Source1:        jellyfish-testdata-20200727.tgz
24f47db
# We do not use the C binding so we just install everything in site_lib
24f47db
Patch0:         fix-build.patch
e848a4b
# The following two patches are needed because we do not ship any C implementation so we manually
e848a4b
# disable the tests that check for this C version
e848a4b
Patch1:         test-only-python-implementation.diff
06a38cc
Patch2:         nocimplementation-fix-0.8.2.patch
24f47db
BuildArch:      noarch
24f47db
BuildRequires:  python3-devel
24f47db
BuildRequires:  python3-setuptools
517a37d
BuildRequires:  python3-pytest
24f47db
351cbe1
%global _description\
351cbe1
Jellyfish does approximate and phonetic string matching. It\
351cbe1
includes the following string comparison algorithms:\
351cbe1
Levenshtein Distance, Damerau-Levenshtein Distance,\
351cbe1
Jaro Distance, Jaro-Winkler Distance, Match Rating Approach\
351cbe1
Comparison and Hamming Distance\
351cbe1
\
351cbe1
And the following phonetic encodings:\
351cbe1
American Soundex, Metaphone, NYSIIS (New York State Identification\
24f47db
and Intelligence System), Match Rating Codex
24f47db
351cbe1
%description %_description
351cbe1
24f47db
%package -n python3-%{realname}
24f47db
Summary:        A python library for doing approximate and phonetic matching of strings
24f47db
24f47db
%description -n python3-%{realname}
24f47db
Jellyfish does approximate and phonetic string matching. It
24f47db
includes the following string comparison algorithms:
24f47db
Levenshtein Distance, Damerau-Levenshtein Distance, 
24f47db
Jaro Distance, Jaro-Winkler Distance, Match Rating Approach
24f47db
Comparison and Hamming Distance
24f47db
24f47db
And the following phonetic encodings:
24f47db
American Soundex, Metaphone, NYSIIS (New York State Identification
24f47db
and Intelligence System), Match Rating Codex
24f47db
24f47db
%prep
24f47db
%setup -q -n %{realname}-%{version}
24f47db
%patch0 -p1
e848a4b
%patch1 -p1
06a38cc
%patch2 -p1 -b .test
e848a4b
tar xf %{SOURCE1} -C testdata
24f47db
24f47db
%build
e4e9736
%py3_build
24f47db
24f47db
%install
e4e9736
%py3_install
24f47db
24f47db
%check
e848a4b
# testdata is here: https://github.com/jamesturk/jellyfish-testdata.git
e4e9736
PYTHONPATH=. pytest-3 jellyfish/test.py
24f47db
24f47db
%files -n python3-%{realname}
24f47db
%license LICENSE
e848a4b
%doc README.rst docs/comparison.rst docs/index.rst docs/phonetic.rst docs/stemming.rst docs/changelog.rst
24f47db
%{python3_sitelib}/%{realname}
24f47db
%{python3_sitelib}/%{realname}*.egg-info
24f47db
24f47db
%changelog
fcbda35
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-6
fcbda35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
fcbda35
6d8630c
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.8.4-5
6d8630c
- Rebuilt for Python 3.11
6d8630c
63a76bc
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-4
63a76bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
63a76bc
75cc952
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-3
75cc952
- Second attempt - Rebuilt for
75cc952
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
75cc952
63a6b8b
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.8.4-2
63a6b8b
- Rebuilt for Python 3.10
63a6b8b
295eb3c
* Sun Mar 14 2021 Michele Baldessari <michele@acksyn.org> - 0.8.4-1
295eb3c
- New upstream
295eb3c
- New testdata
295eb3c
282f3ed
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-2
282f3ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
282f3ed
06a38cc
* Tue Dec 01 2020 Michele Baldessari <michele@acksyn.org> - 0.8.2-1
06a38cc
- New upstream
06a38cc
29b8991
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-7
29b8991
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
29b8991
dca38d4
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.2-6
dca38d4
- Rebuilt for Python 3.9
dca38d4
ba15891
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-5
ba15891
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ba15891
6fdd629
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.2-4
6fdd629
- Rebuilt for Python 3.8.0rc1 (#1748018)
6fdd629
fb9c269
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.2-3
fb9c269
- Rebuilt for Python 3.8
fb9c269
77dc139
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-2
77dc139
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
77dc139
2ab1aa8
* Sun Jun 23 2019 Michele Baldessari <michele@acksyn.org> - 0.7.2
2ab1aa8
- New upstream
2ab1aa8
5ebc440
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
5ebc440
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
5ebc440
e4e9736
* Wed Oct 17 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.0-4
e4e9736
- Subpackage python2-jellyfish has been removed
e4e9736
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
e4e9736
4a5ede7
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
4a5ede7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
4a5ede7
7c839c5
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-2
7c839c5
- Rebuilt for Python 3.7
7c839c5
758dd2d
* Wed Apr 11 2018 Michele Baldessari <michele@acksyn.org> - 0.6.0-1
758dd2d
- New upstream
758dd2d
860cf72
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6-8
860cf72
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
860cf72
f828f7e
* Fri Jan 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.6-7
f828f7e
- Update Python 2 dependency declarations to new packaging standards
f828f7e
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
f828f7e
351cbe1
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5.6-6
351cbe1
- Python 2 binary package renamed to python2-jellyfish
351cbe1
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
351cbe1
551b1d9
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6-5
551b1d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
551b1d9
58b08d0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6-4
58b08d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
58b08d0
ac18ba8
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.5.6-3
ac18ba8
- Rebuild for Python 3.6
ac18ba8
dcf7326
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.6-2
dcf7326
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
dcf7326
5a2f80c
* Fri Jun 24 2016 Michele Baldessari <michele@acksyn.org> - 0.5.6-1
5a2f80c
- New upstream
5a2f80c
6d1e5c3
* Sun May 22 2016 Michele Baldessari <michele@acksyn.org> - 0.5.4-1
6d1e5c3
- New upstream
6d1e5c3
4ba07a5
* Tue Mar 15 2016 Michele Baldessari <michele@acksyn.org> - 0.5.3-1
4ba07a5
- New upstream
4ba07a5
5bd9f06
* Thu Feb 04 2016 Michele Baldessari <michele@acksyn.org> - 0.5.2-1
5bd9f06
- New upstream (BZ#1304559)
e848a4b
- Added testdata to run tests (python3 only for now)
5bd9f06
ecc25c7
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
ecc25c7
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
ecc25c7
d125cc8
* Mon Jul 13 2015 Michele Baldessari <michele@acksyn.org> - 0.5.1-1
d125cc8
- New upstream (BZ#1242480)
d125cc8
1919036
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
1919036
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
1919036
24f47db
* Wed Jun 03 2015 Michele Baldessari <michele@acksyn.org> - 0.5.0-2
24f47db
- Incorporate feedback from review (drop defattr macro, share doc subdir between packages,
24f47db
  avoid py3dir as the source is python 2 and 3 compatible)
24f47db
24f47db
* Thu Apr 23 2015 Michele Baldessari <michele@acksyn.org> - 0.5.0-1
24f47db
- Initial build