From b7d477ce09d3c1dc7fe171445ff5a57d7b0676ce Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Thu, 20 Nov 2025 12:14:18 +0100 Subject: [PATCH] Update to 2.23 (rhbz#2394085) --- .gitignore | 1 + pycparser-unbundle-ply.patch | 51 ------------------------------------ python-pycparser.spec | 12 +-------- sources | 2 +- 4 files changed, 3 insertions(+), 63 deletions(-) delete mode 100644 pycparser-unbundle-ply.patch diff --git a/.gitignore b/.gitignore index fd4950b..2fb8ff5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /release_v2.19.tar.gz /release_v2.20.tar.gz /release_v2.22.tar.gz +/release_v2.23.tar.gz diff --git a/pycparser-unbundle-ply.patch b/pycparser-unbundle-ply.patch deleted file mode 100644 index 5abbf72..0000000 --- a/pycparser-unbundle-ply.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py -index 22c64bc..a97c5d1 100644 ---- a/pycparser/c_lexer.py -+++ b/pycparser/c_lexer.py -@@ -8,8 +8,8 @@ - #------------------------------------------------------------------------------ - import re - --from .ply import lex --from .ply.lex import TOKEN -+from ply import lex -+from ply.lex import TOKEN - - - class CLexer(object): -diff --git a/pycparser/c_parser.py b/pycparser/c_parser.py -index d31574a..5fc3544 100644 ---- a/pycparser/c_parser.py -+++ b/pycparser/c_parser.py -@@ -6,7 +6,7 @@ - # Eli Bendersky [https://eli.thegreenplace.net/] - # License: BSD - #------------------------------------------------------------------------------ --from .ply import yacc -+from ply import yacc - - from . import c_ast - from .c_lexer import CLexer -diff --git a/setup.py b/setup.py -index f7e89bf..f78f559 100644 ---- a/setup.py -+++ b/setup.py -@@ -8,6 +8,8 @@ except ImportError: - from distutils.command.install import install as _install - from distutils.command.sdist import sdist as _sdist - -+import ply -+ - - def _run_build_tables(dir): - from subprocess import check_call -@@ -60,7 +62,8 @@ setup( - 'Programming Language :: Python :: 3.12', - ], - python_requires=">=3.8", -- packages=['pycparser', 'pycparser.ply'], -+ packages=['pycparser'], -+ install_requires=['ply==' + ply.__version__], - package_data={'pycparser': ['*.cfg']}, - cmdclass={'install': install, 'sdist': sdist}, - ) diff --git a/python-pycparser.spec b/python-pycparser.spec index aa370d5..58b268f 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -2,20 +2,13 @@ Name: python-pycparser Summary: C parser and AST generator written in Python -Version: 2.22 +Version: 2.23 Release: %autorelease License: BSD-3-Clause URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz Source1: pycparser-0.91.1-remove-relative-sys-path.py -# This is Fedora-specific; I don't think we should request upstream to -# remove embedded libraries from their distribution, when we can remove -# them during packaging. -# It also ensures that pycparser uses the same YACC __tabversion__ as ply -# package to prevent "yacc table file version is out of date" problem. -Patch100: pycparser-unbundle-ply.patch - BuildArch: noarch BuildRequires: python3-devel @@ -42,9 +35,6 @@ need to parse C source code. %prep %autosetup -p1 -n pycparser-release_v%{version} -# remove embedded copy of ply -rm -r pycparser/ply - # Remove relative sys.path from the examples %{python3} %{SOURCE1} examples diff --git a/sources b/sources index 14d685c..1a90863 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (release_v2.22.tar.gz) = 1c5be2b83c0a892cafa55a2595942d7048994772dc0fc71d2943004b4198d939c0bf2a164d763d94fe11d532e49371c59c1cf4037c32dab8d3cf0c553a8de64a +SHA512 (release_v2.23.tar.gz) = 24ed33e5e18b090aa0f687c358f37e94120e54f56682558b1f1e829f8c5a701b5b135854c57dc47c8264aa969887992a8287e0ccf1043e27f50cec311c2b6b36