%global srcname Yapps Name: python-%{srcname} Version: 2.2.0 Release: 8%{?dist} Summary: Yet Another Python Parser System License: MIT URL: https://github.com/smurfix/yapps Source0: %{pypi_source} Source1: https://github.com/smurfix/yapps/blob/master/README.md Source2: https://github.com/smurfix/yapps/blob/master/LICENSE Source3: https://github.com/smurfix/yapps/blob/master/doc/yapps2.man Patch0: https://copr-dist-git.fedorainfracloud.org/cgit/spike/linuxcnc/python-Yapps.git/tree/70a146b66de396c0d2c6bb6979d2cf58a79f4d7b.patch BuildArch: noarch BuildRequires: python3-devel python3-setuptools %global _description %{expand: YAPPS is an easy to use parser generator that is written in Python and generates Python code. There are several parser generator systems already available for Python, but this parser has different goals: Yapps is simple, very easy to use, and produces human-readable parsers.} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} %{_description} Python 3 version. %prep %autosetup -p1 -n %{srcname}-%{version} mkdir doc %if 0%{?fedora} <= 40 cp ../../SOURCES/README.md . cp ../../SOURCES/LICENSE . cp ../../SOURCES/yapps2.man ./doc/ %else cp ../../../SOURCES/README.md . cp ../../../SOURCES/LICENSE . cp ../../../SOURCES/yapps2.man ./doc/ %endif %build %py3_build chmod 755 build/lib/yapps/cli_tool.py %install %py3_install mkdir -p %{buildroot}%{_mandir}/man1 mv doc/yapps2.man doc/yapps2.1 install -m644 doc/yapps2.1 %{buildroot}%{_mandir}/man1 pwd #cp doc/yapps2.man %%{buildroot}%%{_mandir}/man1 %py3_shebang_fix %{buildroot}%{python3_sitelib}/yapps/cli_tool.py %check %if 0%{?fedora} #%%pytest %{python3} setup.py test %endif # Note that there is no %%files section for the unversioned python module %files -n python3-%{srcname} %{python3_sitelib}/%{srcname}-*.egg-info/ %{python3_sitelib}/yapps/ %{_bindir}/yapps2 %doc README.md %license LICENSE %{_mandir}/man?/yapps2.1* %changelog * Sat Sep 14 2024 pappy 2.2.0-8 - drop f38 support * Sat Jul 22 2023 pappy 2.2.0-7 - recompile for Python 3.13 in Fedora 41 * Sat Jul 22 2023 pappy 2.2.0-6 - fedora-review compatible * Fri Mar 17 2023 pappy 2.2.0-5 - mock compatible * Mon Feb 20 2023 pappy 2.2.0-4 - No longer provides for python 2. If somebody comes up - with python 4, please shoot me. * Fri Nov 19 2021 pappy 2.2.0-2 - Update to Fedora 37 * Fri Nov 19 2021 pappy 2.2.0-1 - Origional via spike - Update to Fedora 35, pathfix shebangs and fix execuable bit