%global python3_pkgversion 3.11 Name: python-appdirs Version: 1.4.4 Release: 2.ac12.py3.11%{?dist} Summary: Python module for determining platform-specific directories # https://spdx.org/licenses/MIT.html License: MIT URL: https://github.com/ActiveState/appdirs Source: %{pypi_source appdirs} BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel %description A small Python module for determining appropriate " + " platform-specific directories, e.g. a "user data dir". %package -n python%{python3_pkgversion}-appdirs Summary: %{summary} %description -n python%{python3_pkgversion}-appdirs A small Python 3 module for determining appropriate " + " platform-specific directories, e.g. a "user data dir". %prep %autosetup -n appdirs-%{version} sed -i -e '1{\@^#!/usr/bin/env python@d}' appdirs.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files appdirs %check # upstream's tox.ini just wraps this command with no extra deps # we don't use %%tox here to avoid a dependency loop: tox->platformdirs->appdirs %{python3} setup.py test 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 %files -n python%{python3_pkgversion}-appdirs -f %{pyproject_files} %doc README.rst CHANGES.rst %changelog * Fri Apr 12 2024 Ding-Yi Chen - 1.4.4-2.ac12.py3.11 - Cut corner packaging