%global python3_pkgversion 3.11 Name: python-async-lru Version: 2.0.4 Release: 2.ac15.py3.11%{?dist} Summary: Simple lru_cache for asyncio # SPDX License: MIT URL: https://github.com/aio-libs/async_lru Source: https://github.com/aio-libs/async-lru/archive/refs/tags/v%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pytest-asyncio BuildRequires: python%{python3_pkgversion}-pytest-timeout %global _description %{expand: This package is 100% port of Python built-in function functools.lru_cache for asyncio.} %description %_description %package -n python%{python3_pkgversion}-async-lru Summary: %{summary} %description -n python%{python3_pkgversion}-async-lru %_description %prep %autosetup -p1 -n async-lru-%{version} # Removing pytest CLI options. Most of them are related to coverage. sed -i "/addopts/d" setup.cfg %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files async_lru %check %pytest for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s|(.*)$|\1-%{python3_pkgversion}|"<<<"$b"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s|(.*).([1-8])(.*)$|\1-%{python3_pkgversion}.\2\3|"<<<"$m"); done for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s|(.*).mo$|\1-%{python3_pkgversion}.mo|"<<<"$m"); done for l in $(find %{buildroot}/usr/lib64/lib* -type f -o -type l) ; do mv "$l" $(sed -re "s|(.*).so(.*)$|\1-py%{python3_pkgversion}.so\2|"<<<"$l"); done for p in $(find %{buildroot}/usr/lib64/pkgconfig/* -type f) ; do mv "$p" $(sed -re "s|(.*).pc$|\1-py%{python3_pkgversion}.pc|"<<<"$p"); done %files -n python%{python3_pkgversion}-async-lru -f %{pyproject_files} %doc README.rst %changelog * Thu May 02 2024 Ding-Yi Chen - 2.0.4-2.ac15.py3.11 - Cut corner packaging