%global module jellyfish # Share doc between python-jellyfish and python3-jellyfish %global _docdir_fmt %{name} Name: python-%{module} Version: 0.9.1 Release: %mkrel 1 Summary: A python library for doing approximate and phonetic matching of strings Group: Development/Python License: BSD URL: https://github.com/jamesturk/jellyfish Source0: https://github.com/jamesturk/%{module}/archive/v%{version}/%{module}-%{version}.tar.gz # git repo is here https://github.com/jamesturk/jellyfish-testdata.git # tgz created with: git archive HEAD -o jellyfish-testdata-20200727.tgz Source1: jellyfish-testdata-20200727.tgz # We do not use the C binding so we just install everything in site_lib Patch0: fix-build.patch # The following two patches are needed because we do not ship any C implementation so we manually # disable the tests that check for this C version Patch1: test-only-python-implementation.diff Patch2: nocimplementation-fix-0.9.1.patch BuildArch: noarch BuildRequires: pyproject-rpm-macros BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest %description Jellyfish does approximate and phonetic string matching. It includes the following string comparison algorithms: Levenshtein Distance, Damerau-Levenshtein Distance, Jaro Distance, Jaro-Winkler Distance, Match Rating Approach Comparison and Hamming Distance And the following phonetic encodings: American Soundex, Metaphone, NYSIIS (New York State Identification and Intelligence System), Match Rating Codex. %package -n python3-%{module} Summary: A python library for doing approximate and phonetic matching of strings Group: Development/Python %{?python_provide:%python_provide python3-%{module}} %description -n python3-%{module} Jellyfish does approximate and phonetic string matching. It includes the following string comparison algorithms: Levenshtein Distance, Damerau-Levenshtein Distance, Jaro Distance, Jaro-Winkler Distance, Match Rating Approach Comparison and Hamming Distance And the following phonetic encodings: American Soundex, Metaphone, NYSIIS (New York State Identification and Intelligence System), Match Rating Codex %prep %setup -q -n %{module}-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 -b .test tar xf %{SOURCE1} -C testdata %build %pyproject_wheel %install %pyproject_install %pyproject_save_files jellyfish %check # testdata is here: https://github.com/jamesturk/jellyfish-testdata.git PYTHONPATH=. pytest-3 jellyfish/test.py %files -n python3-%{module} -f %{pyproject_files} %license LICENSE %changelog * Wed Sep 07 2022 neoclust <neoclust> 0.9.1-1.mga9 + Revision: 1885089 - New version 0.9.1 * Sat Mar 26 2022 umeabot <umeabot> 0.8.4-3.mga9 + Revision: 1828544 - Mageia 9 Mass Rebuild * Sun Feb 20 2022 mrambo3501 <mrambo3501> 0.8.4-2.mga9 + Revision: 1781622 - rebuild for python-3.10 * Mon Mar 15 2021 daviddavid <daviddavid> 0.8.4-1.mga9 + Revision: 1703445 - new version: 0.8.4 - rebuild for new python 3.9 * Thu Jan 07 2021 daviddavid <daviddavid> 0.8.2-1.mga8 + Revision: 1669377 - initial package python-jellyfish