%global python3_pkgversion 3.11 Name: python-docopt Epoch: 1 Version: 0.6.2 Release: %autorelease Summary: Pythonic argument parser, that will make you smile License: MIT URL: https://github.com/docopt/docopt # PyPI tarball doesn't have tests Source: %{url}/archive/%{version}/docopt-%{version}.tar.gz BuildArch: noarch # pytest 6.2+ support Patch: %{url}/pull/493.patch %global _description %{expand: Isn't it awesome how optparse and argparse generate help messages based on your code?! Hell no! You know what's awesome? It's when the option parser is generated based on the beautiful help message that you write yourself! This way you don't need to write this stupid repeatable parser-code, and instead can write only the help message--the way you want it.} %description %{_description} %package -n python%{python3_pkgversion}-docopt Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest %description -n python%{python3_pkgversion}-docopt %{_description} %prep %autosetup -n docopt-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files docopt %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}-docopt -f %{pyproject_files} %license LICENSE-MIT %doc README.rst %changelog * Tue Mar 26 2024 Ding-Yi Chen - 0.6.2-2.ac5 - Cut corner packaging