diff --git a/pycparser-2.10-ply.patch b/0001-pycparser-2.10-ply.patch similarity index 41% rename from pycparser-2.10-ply.patch rename to 0001-pycparser-2.10-ply.patch index 1857262cbbe4929195184d9d2eb9e48215f1ce60..767faf8f95a0b06baecf89f9cb65113094ec3892 100644 --- a/pycparser-2.10-ply.patch +++ b/0001-pycparser-2.10-ply.patch @@ -1,7 +1,19 @@ -diff -up pycparser-release_v2.21/pycparser/c_lexer.py.ply pycparser-release_v2.21/pycparser/c_lexer.py ---- pycparser-release_v2.21/pycparser/c_lexer.py.ply 2013-08-03 07:15:32.000000000 -0600 -+++ pycparser-release_v2.21/pycparser/c_lexer.py 2014-08-20 12:40:48.308461164 -0600 -@@ -9,8 +9,8 @@ +From dfcd7c757c0bffe66bc8cb6b5e3c40c48e0636bb Mon Sep 17 00:00:00 2001 +From: liuzhilin +Date: Fri, 7 Jun 2024 14:46:02 +0800 +Subject: [PATCH] pycparser-2.10-ply + +--- + pycparser/c_lexer.py | 4 ++-- + pycparser/c_parser.py | 2 +- + setup.py | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +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 @@ -12,10 +24,11 @@ diff -up pycparser-release_v2.21/pycparser/c_lexer.py.ply pycparser-release_v2.2 class CLexer(object): -diff -up pycparser-release_v2.21/pycparser/c_parser.py.ply pycparser-release_v2.21/pycparser/c_parser.py ---- pycparser-release_v2.21/pycparser/c_parser.py.ply 2013-08-03 07:15:32.000000000 -0600 -+++ pycparser-release_v2.21/pycparser/c_parser.py 2014-08-20 12:40:05.154894980 -0600 -@@ -8,7 +8,7 @@ +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 #------------------------------------------------------------------------------ @@ -24,16 +37,19 @@ diff -up pycparser-release_v2.21/pycparser/c_parser.py.ply pycparser-release_v2. from . import c_ast from .c_lexer import CLexer -diff -up pycparser-release_v2.21/setup.py.ply pycparser-release_v2.21/setup.py ---- pycparser-release_v2.21/setup.py.ply 2013-08-03 07:15:32.000000000 -0600 -+++ pycparser-release_v2.21/setup.py 2014-08-20 12:40:05.154894980 -0600 +diff --git a/setup.py b/setup.py +index f7e89bf..4ffc339 100644 +--- a/setup.py ++++ b/setup.py @@ -60,7 +60,7 @@ setup( - 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.12', ], - python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", + python_requires=">=3.8", - packages=['pycparser', 'pycparser.ply'], + packages=['pycparser'], package_data={'pycparser': ['*.cfg']}, cmdclass={'install': install, 'sdist': sdist}, ) --- +-- +2.43.0 + diff --git a/skip-test_examples.patch b/0002-skip-test_examples.patch similarity index 54% rename from skip-test_examples.patch rename to 0002-skip-test_examples.patch index 33c1b41a9c7b4d798c4f9ebf0c2c44e9283b94f4..c0b07ff801288299edbaa26b4c20a6911fed243b 100644 --- a/skip-test_examples.patch +++ b/0002-skip-test_examples.patch @@ -1,19 +1,17 @@ -From a54a13cf3cd6a6f06659f7137f11de5fd862c3bd Sun Dec 26 11:35:31 2001 -From: renhongxun -Date: Sun, 26 Dec 2021 11:33:01 +0800 -Subject: [PATCH] skip test_examples - -reason:all test_examples ran failed originally +From 27bcfbe723307f0018e10c195aaf91294a91b604 Mon Sep 17 00:00:00 2001 +From: liuzhilin +Date: Fri, 7 Jun 2024 14:48:25 +0800 +Subject: [PATCH] skip-test_examples --- tests/test_examples.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_examples.py b/tests/test_examples.py -index 3c516e1..a679066 100644 +index b6f36db..aff2e20 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py -@@ -14,6 +14,8 @@ class TestExamplesSucceed(unittest.TestCase): +@@ -12,6 +12,8 @@ class TestExamplesSucceed(unittest.TestCase): @unittest.skipUnless(cpp_supported(), 'cpp only works on Unix') def test_all_examples(self): root = './examples' @@ -21,7 +19,7 @@ index 3c516e1..a679066 100644 + return 0 for filename in os.listdir(root): if os.path.splitext(filename)[1] == '.py': - # TODO: It would be nice to use subTest here, but that's not + with self.subTest(name=filename): -- -1.8.3.1 +2.43.0 diff --git a/pycparser-release_v2.22.tar.gz b/pycparser-release_v2.22.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f3abe95609c5fccb2a0b489f5080583669a68d37 Binary files /dev/null and b/pycparser-release_v2.22.tar.gz differ diff --git a/python-pycparser.spec b/python-pycparser.spec index 5fb1424a69a2b96f1d0a9030d5a24aa04115c262..f8c9a0378699b1aafb4cd59991ed921ca07881c4 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -1,16 +1,16 @@ Name: python-pycparser Summary: A parser for the C language -Version: 2.21 -Release: 2 +Version: 2.22 +Release: 1 License: BSD URL: http://github.com/eliben/pycparser -Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz +Source0: http://github.com/eliben/pycparser/archive/pycparser-release_v%{version}.tar.gz # source1 from https://koji.fedoraproject.org/koji/buildinfo?buildID=1092324 Source1: pycparser-0.91.1-remove-relative-sys-path.py # patch1 is adapted from https://koji.fedoraproject.org/koji/buildinfo?buildID=1092324 # remove embedded libraries during packaging -Patch01: pycparser-2.10-ply.patch -Patch02: skip-test_examples.patch +Patch01: 0001-pycparser-2.10-ply.patch +Patch02: 0002-skip-test_examples.patch BuildArch: noarch @@ -71,6 +71,12 @@ popd %{python3_sitelib}/pycparser-*.egg-info %changelog +* Fri Jun 07 2024 liuzhilin - 2.22-1 +- Update to 2.22 +- Create a Security Policy. +- Add an encoding parameter to parse_file. +- Use proper SPDX identifier. + * Wed Nov 2 2022 zhangruifang - 2.21-2 - Rebuild for next release diff --git a/release_v2.21.tar.gz b/release_v2.21.tar.gz deleted file mode 100644 index 0fa74debe7fa57d43a05c2d58e1968961ab8b3ee..0000000000000000000000000000000000000000 Binary files a/release_v2.21.tar.gz and /dev/null differ