Compare commits

..

No commits in common. 'c9' and 'i10c-beta' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/pyparsing-2.4.7.tar.gz SOURCES/pyparsing-3.1.1.tar.gz

@ -1 +1 @@
b1ce3d1aa0314e2e6a5356dcd9624b4e8adff84e SOURCES/pyparsing-2.4.7.tar.gz 2e9cf056c36c132f15476dfdd50449d48b48f6a2 SOURCES/pyparsing-3.1.1.tar.gz

@ -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)

@ -1,87 +1,88 @@
%global srcname pyparsing ## START: Set by rpmautospec
%global _summary Python package with an object-oriented approach to text processing ## (rpmautospec version 0.6.1)
## RPMAUTOSPEC: autorelease, autochangelog
%global build_wheel 1 %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 5;
%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
# when bootstrapping Python 3, pyparsing needs to be rebuilt before sphinx }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
%bcond_without doc ## END: Set by rpmautospec
Summary: %{_summary} Summary: Python package with an object-oriented approach to text processing
Name: pyparsing Name: pyparsing
Version: 2.4.7 Version: 3.1.1
Release: 9%{?dist} Release: %autorelease
# SPDX
License: MIT License: MIT
URL: https://github.com/pyparsing/pyparsing URL: https://github.com/pyparsing/pyparsing
Source0: https://github.com/%{name}/%{name}/archive/%{name}_%{version}/%{name}-%{version}.tar.gz 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 BuildArch: noarch
BuildRequires: dos2unix BuildRequires: dos2unix
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
# python3 bootstrap: this is rebuilt before the final build of python3, which # python3 bootstrap: this is built before the final build of python3, which
# adds the dependency on python3-rpm-generators, so we require it manually # 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 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} %if %{with doc}
BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx
%endif %endif
%if %{with tests}
%if 0%{?build_wheel} BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-wheel
%endif %endif
%description %description
pyparsing is a module that can be used to easily and directly configure syntax pyparsing is a module that can be used to easily and directly configure syntax
definitions for any number of text parsing applications. definitions for any number of text parsing applications.
%package -n python%{python3_pkgversion}-pyparsing
Summary: %{summary}
%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.
%if %{with doc} %if %{with doc}
%package doc %package doc
Summary: Documentation for pyparsing python package Summary: Documentation for %{name}
# Most examples are under the project's license, MIT # Most examples are under the project's license, MIT
# pymicko.py is under GPLv3+ # pymicko.py is under GPL-3.0-or-later
# snmp_api.h is under CMU-UC (MIT) # snmp_api.h is under MIT-CMU
# sparser.py is under GPLv2+ # sparser.py is under GPL-2.0-or-later
# searchparser.py is under BSD (3-clause, with advertising) # searchparser.py and booleansearchparser.py are under BSD-3-Clause
# btpyparse.py is under "Simplified BSD license" # btpyparse.py is under "Simplified BSD license" -> BSD-2-Clause
License: MIT and GPLv2+ and GPLv3+ and BSD 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 %description doc
The package contains documentation for pyparsing. The package contains documentation for pyparsing.
%endif %endif
%package -n python%{python3_pkgversion}-pyparsing %prep
Summary: %{_summary} %autosetup -p1
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%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. dos2unix -k examples/*
%prep %generate_buildrequires
%setup -q -n %{name}-%{name}_%{version} %pyproject_buildrequires
dos2unix -k CHANGES LICENSE
%build %build
%if 0%{?build_wheel} %pyproject_wheel
%py3_build_wheel
%else
%py3_build
%endif
%if %{with doc} %if %{with doc}
# build docs
pushd docs pushd docs
# Theme is not available # Theme is not available
sed -i '/alabaster/d' conf.py sed -i '/alabaster/d' conf.py
@ -89,25 +90,24 @@ sphinx-build -b html . html
popd popd
%endif %endif
%install %install
%if 0%{?build_wheel} %pyproject_install
%py3_install_wheel %{python_wheelname} %pyproject_save_files pyparsing
%else
%py3_install
%endif
%check %check
%{__python3} unitTests.py %pyproject_check_import -e pyparsing.diagram
%{__python3} simple_unit_tests.py %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 python%{python3_pkgversion}-pyparsing %files -n python%{python3_pkgversion}-pyparsing -f %{pyproject_files}
%license LICENSE %license LICENSE
%doc CHANGES README.rst %doc CHANGES README.rst
%{python3_sitelib}/pyparsing.py
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/pyparsing-*-info/
%if %{with doc} %if %{with doc}
%files doc %files doc
@ -117,24 +117,76 @@ popd
%changelog %changelog
* Wed Feb 16 2022 Tomas Orsava <torsava@redhat.com> - 2.4.7-9 * Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.1.1-5
- Add gating configuration and a simple smoke test - Rebuilt for MSVSphere 10
- Related: rhbz#1950291
* Tue Feb 08 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 2.4.7-8.1 ## START: Generated by rpmautospec
- Add automatically generated Obsoletes tag with the python39- prefix * Tue May 21 2024 Maurizio Lombardi <mlombard@redhat.com> - 3.1.1-5
for smoother upgrade from RHEL8 - remove build dependency on python-railroad-diagrams
- Related: rhbz#1990421
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.7-7.1 * Mon Feb 12 2024 Peter Lemenkov <lemenkov@gmail.com> - 3.1.1-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Fix regression in pyparsing 3.1.1
Related: rhbz#1991688
* Thu May 27 2021 Petr Viktorin <pviktori@redhat.com> - 2.4.7-6.1 * Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-3
- Fix licence for examples shipped in pyparsing-doc - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Dec 16 2023 Terje Rosten <terje.rosten@ntnu.no> - 3.1.1-1
- Update to pyparsing 3.1.1. Closes rhbz#2215810.
- Use new source url
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.9-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jul 12 2023 Karolina Surma <ksurma@redhat.com> - 3.0.9-10
- Declare the license as an SPDX expression
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 3.0.9-9
- Rebuilt for Python 3.12
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.0.9-8
- Bootstrap for Python 3.12
* Tue Feb 07 2023 Miro Hrončok <miro@hroncok.cz> - 3.0.9-5
- Drop unneeded build dependency on coverage
* Tue Feb 07 2023 Miro Hrončok <miro@hroncok.cz> - 3.0.9-4
- Drop the bootstrap bcond
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.7-6 * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.9-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jul 15 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.0.9-1
- Version 3.0.9 (rhbz#2016781)
* Fri Jul 15 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.4.7-18
- Reorder %%package stanzas so %%_summary is not necessary
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.4.7-12
- Rebuilt for Python 3.11
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.4.7-11
- Bootstrap for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 2.4.7-8
- Rebuilt for Python 3.10
* Tue Jun 01 2021 Python Maint <python-maint@redhat.com> - 2.4.7-7
- Bootstrap for Python 3.10
* Thu May 27 2021 Petr Viktorin <pviktori@redhat.com> - 2.4.7-6
- Fix licence for examples shipped in pyparsing-doc
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-5 * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
@ -352,3 +404,5 @@ popd
* Wed Aug 3 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 1.3-1 * Wed Aug 3 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 1.3-1
- Initial RPM release - Initial RPM release
## END: Generated by rpmautospec

Loading…
Cancel
Save