From 233896e754fab2d0445a2c5189a062412273c716 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 20 Nov 2024 13:47:07 +0000 Subject: [PATCH] import RHEL 10 Beta pyparsing-3.1.1-5.el10 --- .gitignore | 3 +- ...an-empty-error-message-to-delegated-.patch | 20 ++ pyparsing.spec | 271 ++++++++++++++---- sources | 2 +- 4 files changed, 243 insertions(+), 53 deletions(-) create mode 100644 pyparsing-0001-Avoid-assigning-an-empty-error-message-to-delegated-.patch diff --git a/.gitignore b/.gitignore index cf86c65..c0d2521 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/pyparsing-2.1.10.tar.gz -/pyparsing-2.1.10.tar.gz +pyparsing-3.1.1.tar.gz diff --git a/pyparsing-0001-Avoid-assigning-an-empty-error-message-to-delegated-.patch b/pyparsing-0001-Avoid-assigning-an-empty-error-message-to-delegated-.patch new file mode 100644 index 0000000..71e080e --- /dev/null +++ b/pyparsing-0001-Avoid-assigning-an-empty-error-message-to-delegated-.patch @@ -0,0 +1,20 @@ +From: InSync <122007197+InSyncWithFoo@users.noreply.github.com> +Date: Sat, 13 Jan 2024 05:04:57 +0000 +Subject: [PATCH] Avoid assigning an empty error message to delegated parse + exception + + +diff --git a/pyparsing/core.py b/pyparsing/core.py +index 73514ed..fc19d1c 100644 +--- a/pyparsing/core.py ++++ b/pyparsing/core.py +@@ -4569,7 +4569,8 @@ class ParseElementEnhance(ParserElement): + return self.expr._parse(instring, loc, doActions, callPreParse=False) + except ParseBaseException as pbe: + if not isinstance(self, Forward) or self.customName is not None: +- pbe.msg = self.errmsg ++ if self.errmsg: ++ pbe.msg = self.errmsg + raise + else: + raise ParseException(instring, loc, "No expression defined", self) diff --git a/pyparsing.spec b/pyparsing.spec index 2b965f6..8ba40d3 100644 --- a/pyparsing.spec +++ b/pyparsing.spec @@ -1,88 +1,257 @@ -%global srcname pyparsing -%global sum Python package with an object-oriented approach to text processing +## START: Set by rpmautospec +## (rpmautospec version 0.6.1) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 5; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec -%global build_wheel 1 - -%global python3_wheelname %{srcname}-%{version}-py2.py3-none-any.whl - -Summary: %{sum} +Summary: Python package with an object-oriented approach to text processing Name: pyparsing -Version: 2.1.10 -Release: 7%{?dist} +Version: 3.1.1 +Release: %autorelease +# SPDX License: MIT -URL: http://pyparsing.wikispaces.com/ -Source0: http://downloads.sourceforge.net/pyparsing/pyparsing-%{version}.tar.gz - +URL: https://github.com/pyparsing/pyparsing +Source0: https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Patch1: pyparsing-0001-Avoid-assigning-an-empty-error-message-to-delegated-.patch BuildArch: noarch BuildRequires: dos2unix -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%if 0%{?build_wheel} -BuildRequires: python%{python3_pkgversion}-pip -BuildRequires: python%{python3_pkgversion}-wheel +# python3 bootstrap: this is built before the final build of python3, which +# adds the dependency on python3-rpm-generators, so we require it manually +# (python BuildRequires systemtap-sdt-devel which requires python3-pyparsing) +BuildRequires: python3-rpm-generators +# We need those for the same reason: +%bcond doc 1 +%bcond tests 1 + +BuildRequires: python%{python3_pkgversion}-devel + +%if %{with doc} +BuildRequires: python%{python3_pkgversion}-sphinx %endif +%if %{with tests} +BuildRequires: python%{python3_pkgversion}-pytest +%endif + %description pyparsing is a module that can be used to easily and directly configure syntax definitions for any number of text parsing applications. -%package doc -Summary: Documentation for pyparsing python package +%package -n python%{python3_pkgversion}-pyparsing +Summary: %{summary} -%description doc -The package contains documentation for pyparsing. - - -%package -n python3-pyparsing -Summary: %{sum} -%{?python_provide:%python_provide python3-%{srcname}} - -%description -n python3-pyparsing +%description -n python%{python3_pkgversion}-pyparsing pyparsing is a module that can be used to easily and directly configure syntax definitions for any number of text parsing applications. -This is the Python 3 version. + +%if %{with doc} +%package doc +Summary: Documentation for %{name} + +# Most examples are under the project's license, MIT +# pymicko.py is under GPL-3.0-or-later +# snmp_api.h is under MIT-CMU +# sparser.py is under GPL-2.0-or-later +# searchparser.py and booleansearchparser.py are under BSD-3-Clause +# btpyparse.py is under "Simplified BSD license" -> BSD-2-Clause +License: MIT AND MIT-CMU AND GPL-2.0-or-later AND GPL-3.0-or-later AND BSD-3-Clause AND BSD-2-Clause + +%description doc +The package contains documentation for pyparsing. +%endif %prep -%setup -q -mv docs/pyparsingClassDiagram.PNG docs/pyparsingClassDiagram.png -rm docs/pyparsingClassDiagram.JPG -dos2unix -k CHANGES LICENSE README +%autosetup -p1 + +dos2unix -k examples/* + + +%generate_buildrequires +%pyproject_buildrequires + %build -%if 0%{?build_wheel} -%py3_build_wheel -%else -%py3_build +%pyproject_wheel + +%if %{with doc} +pushd docs +# Theme is not available +sed -i '/alabaster/d' conf.py +sphinx-build -b html . html +popd %endif + %install -%if 0%{?build_wheel} -%py3_install_wheel %{python3_wheelname} -%else -%py3_install +%pyproject_install +%pyproject_save_files pyparsing + + +%check +%pyproject_check_import -e pyparsing.diagram +%if %{with tests} +# Exclude test_range_check, testEmptyExpressionsAreHandledProperly and the test_diagram.py module +# because they depend on python-railroad-diagrams +%pytest -v -k 'not test_range_check and not testEmptyExpressionsAreHandledProperly' --ignore tests/test_diagram.py %endif -%files -n python3-pyparsing +%files -n python%{python3_pkgversion}-pyparsing -f %{pyproject_files} %license LICENSE -%doc CHANGES README LICENSE -%{python3_sitelib}/pyparsing.py -%{python3_sitelib}/__pycache__/* -%{python3_sitelib}/pyparsing-*dist-info/ +%doc CHANGES README.rst +%if %{with doc} %files doc %license LICENSE -%doc CHANGES README HowToUsePyparsing.html docs examples htmldoc +%doc CHANGES README.rst docs/html examples +%endif + %changelog -* Tue May 29 2018 Petr Viktorin - 2.1.10-7 -- Remove Python 2 subpackage - https://bugzilla.redhat.com/show_bug.cgi?id=1567403 +## START: Generated by rpmautospec +* Tue May 21 2024 Maurizio Lombardi - 3.1.1-5 +- remove build dependency on python-railroad-diagrams + +* Mon Feb 12 2024 Peter Lemenkov - 3.1.1-4 +- Fix regression in pyparsing 3.1.1 + +* Fri Jan 26 2024 Fedora Release Engineering - 3.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 3.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Dec 16 2023 Terje Rosten - 3.1.1-1 +- Update to pyparsing 3.1.1. Closes rhbz#2215810. +- Use new source url + +* Fri Jul 21 2023 Fedora Release Engineering - 3.0.9-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jul 12 2023 Karolina Surma - 3.0.9-10 +- Declare the license as an SPDX expression + +* Fri Jun 16 2023 Python Maint - 3.0.9-9 +- Rebuilt for Python 3.12 + +* Tue Jun 13 2023 Python Maint - 3.0.9-8 +- Bootstrap for Python 3.12 + +* Tue Feb 07 2023 Miro Hrončok - 3.0.9-5 +- Drop unneeded build dependency on coverage + +* Tue Feb 07 2023 Miro Hrončok - 3.0.9-4 +- Drop the bootstrap bcond + +* Fri Jan 20 2023 Fedora Release Engineering - 3.0.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 3.0.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jul 15 2022 Zbigniew Jędrzejewski-Szmek - 3.0.9-1 +- Version 3.0.9 (rhbz#2016781) + +* Fri Jul 15 2022 Zbigniew Jędrzejewski-Szmek - 2.4.7-18 +- Reorder %%package stanzas so %%_summary is not necessary + +* Mon Jun 13 2022 Python Maint - 2.4.7-12 +- Rebuilt for Python 3.11 + +* Mon Jun 13 2022 Python Maint - 2.4.7-11 +- Bootstrap for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 2.4.7-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 2.4.7-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jun 02 2021 Python Maint - 2.4.7-8 +- Rebuilt for Python 3.10 + +* Tue Jun 01 2021 Python Maint - 2.4.7-7 +- Bootstrap for Python 3.10 + +* Thu May 27 2021 Petr Viktorin - 2.4.7-6 +- Fix licence for examples shipped in pyparsing-doc + +* Wed Jan 27 2021 Fedora Release Engineering - 2.4.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 2.4.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri May 22 2020 Miro Hrončok - 2.4.7-3 +- Rebuilt for Python 3.9 + +* Thu May 21 2020 Miro Hrončok - 2.4.7-2 +- Bootstrap for Python 3.9 + +* Mon Apr 06 2020 Dan Horák - 2.4.7-1 +- Update to 2.4.7 (#1821085) + +* Mon Mar 30 2020 David King - 2.4.6-3 +- Fix the summary for the Python 3 subpackage + +* Thu Jan 30 2020 Fedora Release Engineering - 2.4.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jan 03 2020 Dan Horák - 2.4.6-1 +- Update to 2.4.6 (#1786815) + +* Fri Nov 15 2019 Dan Horák - 2.4.5-1 +- Update to 2.4.5 (#1768725) +- Drop Python2 subpackage (#1770564) + +* Tue Oct 8 2019 Zbigniew Jędrzejewski-Szmek - 2.4.2-1 +- Update to latest version (#1742167) + +* Mon Sep 02 2019 Miro Hrončok - 2.4.0-6 +- Reduce Python 2 build time dependencies + +* Thu Aug 15 2019 Miro Hrončok - 2.4.0-5 +- Rebuilt for Python 3.8 + +* Thu Aug 15 2019 Miro Hrončok - 2.4.0-4 +- Bootstrap for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 2.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Apr 15 2019 José Matos - 2.4.0-1 +- Update to 2.4.0 + +* Tue Feb 26 2019 Yatin Karel - 2.3.1-1 +- Update to 2.3.1 + +* Sat Feb 02 2019 Fedora Release Engineering - 2.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jan 10 2019 Dan Horák - 2.3.0-1 +- Update to 2.3.0 + +* Fri Jul 13 2018 Fedora Release Engineering - 2.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jun 13 2018 Miro Hrončok - 2.2.0-2 +- Rebuilt for Python 3.7 + +* Wed Mar 14 2018 Charalampos Stratakis - 2.2.0-1 +- Update to 2.2.0 + +* Wed Feb 21 2018 Iryna Shcherbina - 2.1.10-7 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 2.1.10-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild @@ -232,3 +401,5 @@ dos2unix -k CHANGES LICENSE README * Wed Aug 3 2005 Ignacio Vazquez-Abrams 1.3-1 - Initial RPM release + +## END: Generated by rpmautospec diff --git a/sources b/sources index 9987d0e..13f3d0d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyparsing-2.1.10.tar.gz) = 21af73d6f479d52746f269c8fbaf90c1107a8aec756d30af8c7c4e6a2ff0ea9659cc07816b7ea19286bc12d43497f5e8e63351453bf18daf6a1cb380a195532e +SHA512 (pyparsing-3.1.1.tar.gz) = 59ae01e13277e25cabd1a1ea41a27aac9235c09746f54c0eaac53d0aae488309fe2044b3b31e1105cb8207ad3326828ec32bdd5e904cceee8b0d032740679628