From b9e40c67a779cb69d1562522c8880095ec12cc7e Mon Sep 17 00:00:00 2001 From: Mukundan Ragavan Date: Dec 25 2020 19:34:22 +0000 Subject: Intial import (#1910822) --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a172500 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/textdistance-4.2.0.tar.gz diff --git a/python-textdistance.spec b/python-textdistance.spec new file mode 100644 index 0000000..6fd9d82 --- /dev/null +++ b/python-textdistance.spec @@ -0,0 +1,79 @@ + +%global pypi_name textdistance + +%global _description %{expand: +TextDistance - python library for comparing distance between two or more +sequences by many algorithms. + +Features: +- 30+ algorithms +- Pure python implementation +- Simple usage +- More than two sequences comparing +- Some algorithms have more than one implementation in one class. +- Optional numpy usage for maximum speed. +} + +Name: python-%{pypi_name} +Version: 4.2.0 +Release: 2%{?dist} +Summary: Compute distance between the two texts + +License: MIT +URL: https://github.com/orsinium/textdistance +Source0: %{pypi_source} +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) + +# required for tests +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(hypothesis) +BuildRequires: python3dist(numpy) +BuildRequires: python3dist(jellyfish) + +%description +%_description + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +%_description + + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%py3_build + +%install +%py3_install + +# Fix bad executable permission +mkdir -p %{buildroot}%{_docdir}/python3-%{pypi_name} +cp -pr README.md %{buildroot}%{_docdir}/python3-%{pypi_name} +chmod 644 %{buildroot}%{_docdir}/python3-%{pypi_name}/README.md + +%check +# disable tests that need abydos +%{__python3} -m pytest -v -k 'not test_list_of_numbers and not test_qval and not test_compare' + +%files -n python3-%{pypi_name} +%license LICENSE +%{_docdir}/python3-%{pypi_name} +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + +%changelog +* Fri Dec 25 2020 Mukundan Ragavan - 4.2.0-2 +- Fix directory ownership +- run tests + +* Thu Dec 24 2020 Mukundan Ragavan - 4.2.0-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..d1411bc --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (textdistance-4.2.0.tar.gz) = 8b58d02824d0c94ece9d0322180dd25af7dd0cef708e3f981efa16e262373532de3d68aed7dffd2008cfb04f30495a1792f2f22e9f1d8a802426d464c20d7b07