diff --git a/.gitignore b/.gitignore index da1c863..f0902a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /lunr.py-0.5.6.tar.gz /lunr.py-0.6.0.tar.gz +/lunr-0.6.0.tar.gz diff --git a/python-lunr.spec b/python-lunr.spec index 1164c3a..a4a0dd4 100644 --- a/python-lunr.spec +++ b/python-lunr.spec @@ -1,68 +1,70 @@ -%global pypiname lunr - -Name: python-%{pypiname} +Name: python-lunr Version: 0.6.0 Release: 3%{?dist} Summary: A Python implementation of Lunr.js License: MIT URL: https://github.com/yeraydiazdiaz/lunr.py -Source0: https://github.com/yeraydiazdiaz/lunr.py/archive/%{version}.tar.gz#/%{pypiname}.py-%{version}.tar.gz +BuildArch: noarch +Source0: %{pypi_source lunr} # Remove nltk version constraint to fix FailsToInstall Patch0: lunr_nltk.patch -BuildArch: noarch +BuildRequires: python3-devel +# For tests +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(mock) -%global _description %{expand: +%description This Python version of Lunr.js aims to bring the simple and powerful full text search capabilities into Python guaranteeing results as close as the original -implementation as possible.} +implementation as possible. -%description %_description -%package -n python3-%{pypiname} +%package -n python3-lunr Summary: %{summary} -BuildRequires: python3-devel -BuildRequires: python3dist(setuptools) -%{?python_provide:%python_provide python3-%{pypiname}} -#Some nltk resource is needed to run tests but not available in Fedora -# BuildRequires: python3-six -# BuildRequires: python3-future -# BuildRequires: python3-pytest -# BuildRequires: python3-pytest-timeout -# BuildRequires: python3-mock -# BuildRequires: python3dist(nltk) >= 3.2.5 -# BuildRequires: /usr/bin/coverage +%description -n python3-lunr +This Python version of Lunr.js aims to bring the simple and powerful full text +search capabilities into Python guaranteeing results as close as the original +implementation as possible. + -%{?python_extras_subpkg:Recommends: python3-%{pypiname}+languages} -%{!?python_extras_subpkg:Recommends: python3dist(nltk) >= 3.2.5} +%pyproject_extras_subpkg -n python3-lunr languages -%description -n python3-%{pypiname} %_description -%{?python_extras_subpkg:%python_extras_subpkg -n python3-%{pypiname} -i %{python3_sitelib}/%{pypiname}-*.egg-info languages} +%generate_buildrequires +%pyproject_buildrequires -r -x languages %prep -%autosetup -p1 -n %{pypiname}.py-%{version} +%autosetup -p1 -n lunr-%{version} + %build -%py3_build +%pyproject_wheel + %install -%py3_install +%pyproject_install +%pyproject_save_files lunr + %check -#make tests +# test_reduces_words_to_their_stem requires missing tests/fixtures/stemming_vocab.json +%pytest -k "not test_reduces_words_to_their_stem" -%files -n python3-%{pypiname} + +%files -n python3-lunr -f %{pyproject_files} +%doc README.md %license LICENSE -%doc README.md CHANGELOG.md readme.rst docs/ -%{python3_sitelib}/%{pypiname}-*.egg-info/ -%{python3_sitelib}/%{pypiname}/ + %changelog +* Wed Jan 05 2022 Sandro Mani - 0.6.0-4 +- Modernize spec + * Fri Oct 08 2021 Sandro Mani - 0.6.0-3 - Remove nltk version constraint to fix FailsToInstall diff --git a/sources b/sources index b90ab5c..15ee77b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lunr.py-0.6.0.tar.gz) = 2067c34c12f77ab0fb32c7f800ea3c647a1073c061a14f2b72b2b95fc8d624429aa37e85992eee5d5b24add179eab1d81af52af09f0db67d6cae459a5faa0925 +SHA512 (lunr-0.6.0.tar.gz) = 035f1ba81e4a7323b88eb0e5fb2482814808dfe7c5781f4a2767e7003d66fe97f8f2957f3506f406399d4a293c4105a98ff282d377d42a03b3ce9e41101db34c