24f47d
%global realname jellyfish
24f47d
# Share doc between python-jellyfish and python3-jellyfish
24f47d
%global _docdir_fmt %{name}
24f47d
24f47d
Name:           python-%{realname}
2ab1aa
Version:        0.7.2
6fdd62
Release:        4%{?dist}
24f47d
Summary:        A python library for doing approximate and phonetic matching of strings
24f47d
24f47d
License:        BSD
24f47d
URL:            https://github.com/jamesturk/%{realname}
24f47d
Source0:        https://github.com/jamesturk/%{realname}/archive/%{version}.tar.gz#/%{realname}-%{version}.tar.gz 
e848a4
# git repo is here https://github.com/jamesturk/jellyfish-testdata.git
e848a4
# tgz created with: git archive HEAD -o jellyfish-testdata-20160204.tgz
e848a4
Source1:        jellyfish-testdata-20160204.tgz
24f47d
# We do not use the C binding so we just install everything in site_lib
24f47d
Patch0:         fix-build.patch
e848a4
# The following two patches are needed because we do not ship any C implementation so we manually
e848a4
# disable the tests that check for this C version
e848a4
Patch1:         test-only-python-implementation.diff
e848a4
Patch2:         mark-segfault-test-xfail.diff
2ab1aa
Patch3:         nocimplementation-fix-0.7.2.patch
24f47d
BuildArch:      noarch
24f47d
BuildRequires:  python3-devel
24f47d
BuildRequires:  python3-setuptools
517a37
BuildRequires:  python3-pytest
24f47d
351cbe
%global _description\
351cbe
Jellyfish does approximate and phonetic string matching. It\
351cbe
includes the following string comparison algorithms:\
351cbe
Levenshtein Distance, Damerau-Levenshtein Distance,\
351cbe
Jaro Distance, Jaro-Winkler Distance, Match Rating Approach\
351cbe
Comparison and Hamming Distance\
351cbe
\
351cbe
And the following phonetic encodings:\
351cbe
American Soundex, Metaphone, NYSIIS (New York State Identification\
24f47d
and Intelligence System), Match Rating Codex
24f47d
351cbe
%description %_description
351cbe
24f47d
%package -n python3-%{realname}
24f47d
Summary:        A python library for doing approximate and phonetic matching of strings
24f47d
24f47d
%description -n python3-%{realname}
24f47d
Jellyfish does approximate and phonetic string matching. It
24f47d
includes the following string comparison algorithms:
24f47d
Levenshtein Distance, Damerau-Levenshtein Distance, 
24f47d
Jaro Distance, Jaro-Winkler Distance, Match Rating Approach
24f47d
Comparison and Hamming Distance
24f47d
24f47d
And the following phonetic encodings:
24f47d
American Soundex, Metaphone, NYSIIS (New York State Identification
24f47d
and Intelligence System), Match Rating Codex
24f47d
24f47d
%prep
24f47d
%setup -q -n %{realname}-%{version}
24f47d
%patch0 -p1
e848a4
%patch1 -p1
e848a4
%patch2 -p1
6d1e5c
%patch3 -p1
e848a4
tar xf %{SOURCE1} -C testdata
24f47d
24f47d
%build
e4e973
%py3_build
24f47d
24f47d
%install
e4e973
%py3_install
24f47d
24f47d
%check
e848a4
# testdata is here: https://github.com/jamesturk/jellyfish-testdata.git
e4e973
PYTHONPATH=. pytest-3 jellyfish/test.py
24f47d
24f47d
%files -n python3-%{realname}
24f47d
%license LICENSE
e848a4
%doc README.rst docs/comparison.rst docs/index.rst docs/phonetic.rst docs/stemming.rst docs/changelog.rst
24f47d
%{python3_sitelib}/%{realname}
24f47d
%{python3_sitelib}/%{realname}*.egg-info
24f47d
24f47d
%changelog
6fdd62
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.2-4
6fdd62
- Rebuilt for Python 3.8.0rc1 (#1748018)
6fdd62
fb9c26
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.2-3
fb9c26
- Rebuilt for Python 3.8
fb9c26
77dc13
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-2
77dc13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
77dc13
2ab1aa
* Sun Jun 23 2019 Michele Baldessari <michele@acksyn.org> - 0.7.2
2ab1aa
- New upstream
2ab1aa
5ebc44
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
5ebc44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
5ebc44
e4e973
* Wed Oct 17 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.0-4
e4e973
- Subpackage python2-jellyfish has been removed
e4e973
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
e4e973
4a5ede
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
4a5ede
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
4a5ede
7c839c
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-2
7c839c
- Rebuilt for Python 3.7
7c839c
758dd2
* Wed Apr 11 2018 Michele Baldessari <michele@acksyn.org> - 0.6.0-1
758dd2
- New upstream
758dd2
860cf7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6-8
860cf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
860cf7
f828f7
* Fri Jan 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.6-7
f828f7
- Update Python 2 dependency declarations to new packaging standards
f828f7
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
f828f7
351cbe
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5.6-6
351cbe
- Python 2 binary package renamed to python2-jellyfish
351cbe
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
351cbe
551b1d
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6-5
551b1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
551b1d
58b08d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6-4
58b08d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
58b08d
ac18ba
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.5.6-3
ac18ba
- Rebuild for Python 3.6
ac18ba
dcf732
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.6-2
dcf732
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
dcf732
5a2f80
* Fri Jun 24 2016 Michele Baldessari <michele@acksyn.org> - 0.5.6-1
5a2f80
- New upstream
5a2f80
6d1e5c
* Sun May 22 2016 Michele Baldessari <michele@acksyn.org> - 0.5.4-1
6d1e5c
- New upstream
6d1e5c
4ba07a
* Tue Mar 15 2016 Michele Baldessari <michele@acksyn.org> - 0.5.3-1
4ba07a
- New upstream
4ba07a
5bd9f0
* Thu Feb 04 2016 Michele Baldessari <michele@acksyn.org> - 0.5.2-1
5bd9f0
- New upstream (BZ#1304559)
e848a4
- Added testdata to run tests (python3 only for now)
5bd9f0
ecc25c
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
ecc25c
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
ecc25c
d125cc
* Mon Jul 13 2015 Michele Baldessari <michele@acksyn.org> - 0.5.1-1
d125cc
- New upstream (BZ#1242480)
d125cc
191903
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
191903
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
191903
24f47d
* Wed Jun 03 2015 Michele Baldessari <michele@acksyn.org> - 0.5.0-2
24f47d
- Incorporate feedback from review (drop defattr macro, share doc subdir between packages,
24f47d
  avoid py3dir as the source is python 2 and 3 compatible)
24f47d
24f47d
* Thu Apr 23 2015 Michele Baldessari <michele@acksyn.org> - 0.5.0-1
24f47d
- Initial build