%global python3_pkgversion 3.11 %global srcname partd Name: python-%{srcname} Version: 1.4.1 Release: 2.ac16.py3.11%{?dist} Summary: Appendable key-value storage License: BSD-3-Clause URL: https://github.com/dask/partd Source0: %pypi_source %{srcname} # compatibility with Python 3.12 Patch: https://github.com/dask/partd/pull/70.patch BuildArch: noarch %global _description %{expand: Key-value byte store with appendable values: Partd stores key-value pairs. Values are raw bytes. We append on old values. Partd excels at shuffling operations.} %description %{_description} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}dist(pytest) Recommends: python3-%{srcname}+complete %description -n python%{python3_pkgversion}-%{srcname} %{_description} %pyproject_extras_subpkg -n python3-%{srcname} complete %prep %autosetup -n %{srcname}-%{version} -p1 %generate_buildrequires %pyproject_buildrequires -rx complete %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %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}-%{srcname} -f %{pyproject_files} %doc README.rst %license LICENSE.txt %changelog * Mon May 20 2024 Ding-Yi Chen - 1.4.1-2.ac16.py3.11 - Cut corner packaging