%global __python3 /usr/bin/python3.11 %global python3_pkgversion 3.11 %global srcname pyparsing %global python_wheelname %{srcname}-%{version}-py3-none-any.whl # When bootstraping we don't have pytest yet %bcond_with tests Summary: Python package with an object-oriented approach to text processing Name: python%{python3_pkgversion}-pyparsing Version: 3.0.7 Release: 1%{?dist} License: MIT URL: https://github.com/pyparsing/pyparsing Source0: https://github.com/%{srcname}/%{srcname}/archive/%{srcname}_%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %if %{with tests} BuildRequires: python%{python3_pkgversion}-pytest %endif BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-wheel %description pyparsing is a module that can be used to easily and directly configure syntax definitions for any number of text parsing applications. %prep %autosetup -p1 -n %{srcname}-%{srcname}_%{version} %build %py3_build_wheel %install %py3_install_wheel %{python_wheelname} %if %{with tests} %check # Ignore the tests that require the missing railroad dependency %pytest -v --ignore=tests/test_diagram.py -k "not testEmptyExpressionsAreHandledProperly" %endif %files -n python%{python3_pkgversion}-pyparsing %license LICENSE %doc CHANGES README.rst %{python3_sitelib}/pyparsing/ %{python3_sitelib}/pyparsing-%{version}.dist-info/ %changelog * Fri Nov 25 2022 Charalampos Stratakis - 3.0.7-1 - Initial package - Fedora contributions by: # Alan Pevec # Bill Nottingham # Charalampos Stratakis # Dan Horák # David King # David Malcolm # Dennis Gilmore # Ignacio Vazquez-Abrams # Iryna Shcherbina # Jesse Keating # José Abílio Oliveira Matos # José Matos # Lumir Balhar # Miro Hrončok # Petr Viktorin # Robert Kuska # Slavek Kabrda # Terje Røsten # Thomas Spura # Tomáš Hrnčiar # Ville Skyttä # yatin # Zbigniew Jędrzejewski-Szmek