## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: python-pyxdameraulevenshtein Version: 1.7.1 Release: %autorelease Summary: Damerau-Levenshtein (DL) edit distance algorithm License: BSD-3-Clause URL: https://github.com/lanl/pyxDamerauLevenshtein # The PyPI sdist lacks the tests. Source: %{url}/archive/v%{version}/pyxDamerauLevenshtein-%{version}.tar.gz BuildRequires: python3-devel BuildRequires: gcc BuildRequires: dos2unix # Upstream relies on running Cython manually; see: # https://github.com/lanl/pyxDamerauLevenshtein/issues/18 BuildRequires: %{py3_dist Cython} # The tests only require unittest, but pytest is a more convenient runner. BuildRequires: %{py3_dist pytest} %global common_description %{expand: pyxDamerauLevenshtein implements the Damerau-Levenshtein (DL) edit distance algorithm for Python in Cython for high performance.} %description %{common_description} %package -n python3-pyxdameraulevenshtein Summary: %{summary} %description -n python3-pyxdameraulevenshtein %{common_description} %prep %autosetup -n pyxDamerauLevenshtein-%{version} # Remove Cythonized C sources (_initialize.c, but the following is general): # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_using_cython find . -type f -exec grep -FrinIl 'Generated by Cython' '{}' '+' | xargs -r -t rm -v # Fix “DOS-style” CRLF line terminators in CHANGES.md dos2unix --keepdate CHANGES.md %generate_buildrequires %pyproject_buildrequires %build # Upstream relies on running Cython manually; see: # https://github.com/lanl/pyxDamerauLevenshtein/issues/18 %{python3} -m cython pyxdameraulevenshtein/*.pyx %pyproject_wheel %install %pyproject_install %pyproject_save_files -l pyxdameraulevenshtein %check %pytest -v %files -n python3-pyxdameraulevenshtein -f %{pyproject_files} %doc CHANGES.md %doc README.md %changelog ## START: Generated by rpmautospec * Fri Jan 26 2024 Fedora Release Engineering - 1.7.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 1.7.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Dec 18 2023 Benjamin A. Beasley - 1.7.1-2 - Assert that %%pyproject_files contains a license file * Sun Oct 01 2023 Benjamin A. Beasley - 1.7.1-1 - Initial package (close RHBZ#2241171) ## END: Generated by rpmautospec