%global common_description %{expand: prompt_toolkit is a library for building powerful interactive command line applications in Python.} %global python3_pkgversion 3.11 Name: python-prompt-toolkit Version: 3.0.41 Release: %autorelease Summary: Library for building powerful interactive command line applications in Python License: BSD-3-Clause URL: https://github.com/prompt-toolkit/python-prompt-toolkit Source: %{pypi_source prompt_toolkit} BuildArch: noarch %description %{common_description} %package -n python%{python3_pkgversion}-prompt-toolkit Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest # https://github.com/jonathanslenders/python-prompt-toolkit/issues/94 Recommends: python3-pygments %description -n python%{python3_pkgversion}-prompt-toolkit %{common_description} %prep %autosetup -n prompt_toolkit-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files prompt_toolkit %check for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s/(.*).mo$/\1%{python3_pkgversion}.mo/"<<<"$m"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s/(.*).([1-8]([^.]+)?)$/\1%{python3_pkgversion}.\2/"<<<"$m"); done for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s/(.*)$/\1%{python3_pkgversion}/"<<<"$b"); done %pytest %files -n python%{python3_pkgversion}-prompt-toolkit -f %{pyproject_files} %doc README.rst AUTHORS.rst CHANGELOG %changelog * Tue Mar 26 2024 Ding-Yi Chen - 3.0.41-2.ac5 - Cut corner packaging