Name: harry Version: 0.4.2 Release: 2%{?dist} Summary: A tool for measuring string similarity License: GPLv3+ URL: https://github.com/rieck/harry Source0: https://github.com/rieck/%{name}/archive/%{version}.tar.gz Patch0: harry_autotools.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc BuildRequires: libarchive-devel BuildRequires: libconfig-devel BuildRequires: libomp >= 2.5 BuildRequires: libtool BuildRequires: python3 BuildRequires: python3-devel BuildRequires: python3-Levenshtein BuildRequires: python3-numpy BuildRequires: python3-urllib3 BuildRequires: zlib-devel >= 1.2.1 Requires: python3 Requires: python3-Levenshtein Requires: python3-numpy Requires: python3-urllib3 %description Harry is a small tool for comparing strings. The tool supports several common distance and kernel functions for strings as well as some exotic similarity measures. The focus of Harry lies on implicit similarity measures, that is, comparison functions that do not give rise to an explicit vector space. Examples of such similarity measures are the Levenshtein distance, the Jaro-Winkler distance or the spectrum kernel. During operation Harry loads a set of strings from input, computes the specified similarity measure and writes a matrix of similarity values to output. The similarity measure can be computed based on the granularity of bytes, bits and tokens (words) contained in the strings. The configuration of this process, such as the input format, the similarity measure and the output format, are specified in a configuration file and can be additionally refined using command-line options. %prep %autosetup 2to3 --write --nobackups python/gen_options.py %build ./bootstrap %configure --prefix %{_bindir} --enable-prwlock %make_build # convert to Python 3 mv python/gen_options.py python/gen_options.bak 2to3 --write --nobackups */*.py mv python/gen_options.bak python/gen_options.py sed -i 's/input=stdin/input=stdin.encode()/' python/harry.py sed -i 's/env python/env python3/' tests/*.py %check make check %install %make_install mkdir -p %{buildroot}%{_docdir} mv %{buildroot}%{_bindir}/share/doc/%{name} %{buildroot}%{_docdir}/%{name} mv %{buildroot}%{buildroot}%{_bindir}/share/doc/%{name}/* %{buildroot}%{_docdir}/%{name} rm -rf %{buildroot}home mkdir -p %{buildroot}%{python3_sitelib} mv %{buildroot}%{_bindir}/lib/python%{python3_version}/site-packages %{buildroot}%{python3_sitelib}/%{name} %files %{_bindir}/%{name} %{_mandir}/man1/harry.1.gz %license COPYING %{_docdir}/%{name} %{python3_sitelib}/%{name} %changelog * Fri Dec 18 2020 Rudi Landmann 0.4.2-2 - Packaging fixes for Fedora guidelines * Tue Dec 15 2020 Rudi Landmann 0.4.2-1 - Initial RPM package for Fedora, including conversion from Python 2 to Python 3