Blame python-textdistance.spec

b9e40c6
b9e40c6
%global pypi_name textdistance
b9e40c6
b9e40c6
%global _description %{expand:
b9e40c6
TextDistance - python library for comparing distance between two or more 
b9e40c6
sequences by many algorithms.
b9e40c6
b9e40c6
Features:
b9e40c6
- 30+ algorithms
b9e40c6
- Pure python implementation
b9e40c6
- Simple usage
b9e40c6
- More than two sequences comparing
b9e40c6
- Some algorithms have more than one implementation in one class.
b9e40c6
- Optional numpy usage for maximum speed.
b9e40c6
}
b9e40c6
b9e40c6
Name:           python-%{pypi_name}
b9e40c6
Version:        4.2.0
b9e40c6
Release:        2%{?dist}
b9e40c6
Summary:        Compute distance between the two texts
b9e40c6
b9e40c6
License:        MIT
b9e40c6
URL:            https://github.com/orsinium/textdistance
b9e40c6
Source0:        %{pypi_source}
b9e40c6
BuildArch:      noarch
b9e40c6
b9e40c6
BuildRequires:  python3-devel
b9e40c6
BuildRequires:  python3dist(setuptools)
b9e40c6
b9e40c6
# required for tests
b9e40c6
BuildRequires:  python3dist(pytest)
b9e40c6
BuildRequires:  python3dist(hypothesis)
b9e40c6
BuildRequires:  python3dist(numpy)
b9e40c6
BuildRequires:  python3dist(jellyfish)
b9e40c6
b9e40c6
%description
b9e40c6
%_description
b9e40c6
b9e40c6
%package -n     python3-%{pypi_name}
b9e40c6
Summary:        %{summary}
b9e40c6
%{?python_provide:%python_provide python3-%{pypi_name}}
b9e40c6
b9e40c6
%description -n python3-%{pypi_name}
b9e40c6
%_description
b9e40c6
b9e40c6
b9e40c6
%prep
b9e40c6
%autosetup -n %{pypi_name}-%{version}
b9e40c6
# Remove bundled egg-info
b9e40c6
rm -rf %{pypi_name}.egg-info
b9e40c6
b9e40c6
%build
b9e40c6
%py3_build
b9e40c6
b9e40c6
%install
b9e40c6
%py3_install
b9e40c6
b9e40c6
# Fix bad executable permission
b9e40c6
mkdir -p %{buildroot}%{_docdir}/python3-%{pypi_name}
b9e40c6
cp -pr README.md %{buildroot}%{_docdir}/python3-%{pypi_name}
b9e40c6
chmod 644 %{buildroot}%{_docdir}/python3-%{pypi_name}/README.md
b9e40c6
b9e40c6
%check
b9e40c6
# disable tests that need abydos
b9e40c6
%{__python3} -m pytest -v -k 'not test_list_of_numbers and not test_qval and not test_compare'
b9e40c6
b9e40c6
%files -n python3-%{pypi_name}
b9e40c6
%license LICENSE
b9e40c6
%{_docdir}/python3-%{pypi_name}
b9e40c6
%{python3_sitelib}/%{pypi_name}
b9e40c6
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
b9e40c6
b9e40c6
%changelog
b9e40c6
* Fri Dec 25 2020 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.2.0-2
b9e40c6
- Fix directory ownership
b9e40c6
- run tests
b9e40c6
b9e40c6
* Thu Dec 24 2020 Mukundan Ragavan <nonamedotc@gmail.com> - 4.2.0-1
b9e40c6
- Initial package.