%global python3_pkgversion 3.11 Name: python-comm Version: 0.2.2 Release: 2.ac16.py3.11%{?dist} Summary: Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc. License: BSD-3-Clause URL: https://github.com/ipython/comm Source: %{url}/archive/v%{version}/comm-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel %global _description %{expand: Comm provides a way to register a Kernel Comm implementation, as per the Jupyter kernel protocol. It also provides a base Comm implementation and a default CommManager that can be used.} %description %_description %package -n python%{python3_pkgversion}-comm Summary: %{summary} %description -n python%{python3_pkgversion}-comm %_description %prep %autosetup -p1 -n comm-%{version} %generate_buildrequires %pyproject_buildrequires -x test %build %pyproject_wheel %install %pyproject_install %pyproject_save_files comm %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}-comm -f %{pyproject_files} %doc README.md %changelog * Mon May 20 2024 Ding-Yi Chen - 0.2.2-2.ac16.py3.11 - Cut corner packaging