From d5641b347c48f8fd6a74123596761f5ebe92729d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 11:25:04 +0000 Subject: [PATCH 01/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 0dfd48f..4b52c7f 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -5,7 +5,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 10%{?dist} +Release: 11%{?dist} License: BSD Group: System Environment/Libraries URL: http://github.com/eliben/pycparser @@ -113,6 +113,9 @@ popd %endif # with_python3 %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 2.14-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Feb 11 2017 Fedora Release Engineering - 2.14-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 2438ee2785a43086ce4f71cd43e1f2af605dd112 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Wed, 27 Sep 2017 08:10:06 -0700 Subject: [PATCH 02/46] Cleanup spec file conditionals --- python-pycparser.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 4b52c7f..e36aacd 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -1,11 +1,11 @@ -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} >= 8 %global with_python3 1 %endif Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 11%{?dist} +Release: 12%{?dist} License: BSD Group: System Environment/Libraries URL: http://github.com/eliben/pycparser @@ -113,6 +113,9 @@ popd %endif # with_python3 %changelog +* Wed Sep 27 2017 Troy Dawson - 2.14-12 +- Cleanup spec file conditionals + * Thu Jul 27 2017 Fedora Release Engineering - 2.14-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From f2100214a53169a146e42b07d9836018320f78a3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 10:01:41 +0000 Subject: [PATCH 03/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index e36aacd..6cfa8f6 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -5,7 +5,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 12%{?dist} +Release: 13%{?dist} License: BSD Group: System Environment/Libraries URL: http://github.com/eliben/pycparser @@ -113,6 +113,9 @@ popd %endif # with_python3 %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 2.14-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Wed Sep 27 2017 Troy Dawson - 2.14-12 - Cleanup spec file conditionals From cc51b502190ace613b8c24690509d9830ec8c4b9 Mon Sep 17 00:00:00 2001 From: Iryna Shcherbina Date: Mon, 12 Feb 2018 05:30:22 +0100 Subject: [PATCH 04/46] Update Python 2 dependency declarations to new packaging standards --- python-pycparser.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 6cfa8f6..cf5faa0 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -5,7 +5,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 13%{?dist} +Release: 14%{?dist} License: BSD Group: System Environment/Libraries URL: http://github.com/eliben/pycparser @@ -19,11 +19,11 @@ Patch100: pycparser-2.10-ply.patch BuildArch: noarch -BuildRequires: python2-devel python-setuptools +BuildRequires: python2-devel python2-setuptools # for unit tests BuildRequires: dos2unix -BuildRequires: python-ply >= 3.6 +BuildRequires: python2-ply >= 3.6 %if 0%{?with_python3} BuildRequires: python3-devel python3-setuptools @@ -39,7 +39,7 @@ need to parse C source code. %package -n python2-pycparser Summary: C parser and AST generator written in Python Group: System Environment/Libraries -Requires: python-ply >= 3.6 +Requires: python2-ply >= 3.6 %{?python_provide:%python_provide python2-pycparser} %description -n python2-pycparser @@ -113,6 +113,10 @@ popd %endif # with_python3 %changelog +* Mon Feb 12 2018 Iryna Shcherbina - 2.14-14 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + * Fri Feb 09 2018 Fedora Release Engineering - 2.14-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 746b5e656903d7da2e499f7df183410c7de5e8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 15 Jun 2018 20:38:15 +0200 Subject: [PATCH 05/46] Rebuilt for Python 3.7 --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index cf5faa0..7f5ecef 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -5,7 +5,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 14%{?dist} +Release: 15%{?dist} License: BSD Group: System Environment/Libraries URL: http://github.com/eliben/pycparser @@ -113,6 +113,9 @@ popd %endif # with_python3 %changelog +* Fri Jun 15 2018 Miro Hrončok - 2.14-15 +- Rebuilt for Python 3.7 + * Mon Feb 12 2018 Iryna Shcherbina - 2.14-14 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) From ed0202ffc2ca735e05e43bf6b0abb4519edf769d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 01:33:18 +0000 Subject: [PATCH 06/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 7f5ecef..ab5fa46 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -5,7 +5,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 15%{?dist} +Release: 16%{?dist} License: BSD Group: System Environment/Libraries URL: http://github.com/eliben/pycparser @@ -113,6 +113,9 @@ popd %endif # with_python3 %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 2.14-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Jun 15 2018 Miro Hrončok - 2.14-15 - Rebuilt for Python 3.7 From d0331184ca8f9b544224e5f0d725af54d2aa462b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 29 Jul 2018 23:11:21 +0200 Subject: [PATCH 07/46] =?UTF-8?q?%{python=5Fsitelib}=20=E2=86=92=20%{pytho?= =?UTF-8?q?n2=5Fsitelib}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Igor Gnatenko --- python-pycparser.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index ab5fa46..81cf749 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -101,8 +101,8 @@ popd %files -n python2-pycparser %license LICENSE %doc examples -%{python_sitelib}/pycparser/ -%{python_sitelib}/pycparser-*.egg-info +%{python2_sitelib}/pycparser/ +%{python2_sitelib}/pycparser-*.egg-info %if 0%{?with_python3} %files -n python3-pycparser From 9be294f9a5bec9ee5f0a12ad710cfe3f682009d9 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:18:18 +0100 Subject: [PATCH 08/46] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- python-pycparser.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 81cf749..ba4697e 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -7,7 +7,6 @@ Summary: C parser and AST generator written in Python Version: 2.14 Release: 16%{?dist} License: BSD -Group: System Environment/Libraries URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz Source1: pycparser-0.91.1-remove-relative-sys-path.py @@ -38,7 +37,6 @@ need to parse C source code. %package -n python2-pycparser Summary: C parser and AST generator written in Python -Group: System Environment/Libraries Requires: python2-ply >= 3.6 %{?python_provide:%python_provide python2-pycparser} @@ -50,7 +48,6 @@ need to parse C source code. %if 0%{?with_python3} %package -n python3-pycparser Summary: C parser and AST generator written in Python -Group: System Environment/Libraries Requires: python3-ply %{?python_provide:%python_provide python3-pycparser} From 5ff5bcfcac5c3b5e6a89e7389e596d4ab359f0a7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 08:32:27 +0000 Subject: [PATCH 09/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index ba4697e..27f245c 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -5,7 +5,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 16%{?dist} +Release: 17%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz @@ -110,6 +110,9 @@ popd %endif # with_python3 %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 2.14-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Jul 14 2018 Fedora Release Engineering - 2.14-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From abd777e474a0f475d06306be276fa7a4195bf8e7 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 26 Feb 2019 10:57:03 +0100 Subject: [PATCH 10/46] Fix test and avoid yacc table mismatch - Add build dependency on cpp for unit tests - Add dependency on python-ply version to prevent "yacc table file version is out of date" - Fixes RHBZ#1668230 --- python-pycparser.spec | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 27f245c..588e386 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -2,10 +2,14 @@ %global with_python3 1 %endif +# Ensure that pycparser uses the same YACC __tabversion__ as python-ply +# package to prevent "yacc table file version is out of date" problem. +%define ply_version %(LC_ALL=C rpm -q --qf '%%{VERSION}' python3-ply | grep -Eo '^[^.]+\.[^.]+') + Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 17%{?dist} +Release: 18%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz @@ -23,6 +27,7 @@ BuildRequires: python2-devel python2-setuptools # for unit tests BuildRequires: dos2unix BuildRequires: python2-ply >= 3.6 +BuildRequires: cpp %if 0%{?with_python3} BuildRequires: python3-devel python3-setuptools @@ -37,7 +42,7 @@ need to parse C source code. %package -n python2-pycparser Summary: C parser and AST generator written in Python -Requires: python2-ply >= 3.6 +Requires: python2-ply = %{ply_version} %{?python_provide:%python_provide python2-pycparser} %description -n python2-pycparser @@ -48,7 +53,7 @@ need to parse C source code. %if 0%{?with_python3} %package -n python3-pycparser Summary: C parser and AST generator written in Python -Requires: python3-ply +Requires: python3-ply = %{ply_version} %{?python_provide:%python_provide python3-pycparser} %description -n python3-pycparser @@ -110,6 +115,11 @@ popd %endif # with_python3 %changelog +* Tue Feb 26 2019 Christian Heimes - 2.14-18 +- Add build dependency on cpp for unit tests +- Add dependency on python-ply version to prevent "yacc table file version is out of date" +- Fixes RHBZ#1668230 + * Sat Feb 02 2019 Fedora Release Engineering - 2.14-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 268b1571b34436653e1ca506d09ab15a16cf5ac9 Mon Sep 17 00:00:00 2001 From: Marcel Plch Date: Mon, 10 Jun 2019 11:24:27 +0200 Subject: [PATCH 11/46] Avoid invalid unicode escape sequences in Py3.8 --- pycparser-2.14-rstring_fix.patch | 14 ++++++++++++++ python-pycparser.spec | 8 +++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 pycparser-2.14-rstring_fix.patch diff --git a/pycparser-2.14-rstring_fix.patch b/pycparser-2.14-rstring_fix.patch new file mode 100644 index 0000000..2385ad3 --- /dev/null +++ b/pycparser-2.14-rstring_fix.patch @@ -0,0 +1,14 @@ +diff -ru pycparser-release_v2.14/pycparser/c_lexer.py pycparser-release_v2.14_patched/pycparser/c_lexer.py +--- pycparser-release_v2.14/pycparser/c_lexer.py 2019-06-06 15:51:41.937286040 +0200 ++++ pycparser-release_v2.14_patched/pycparser/c_lexer.py 2019-06-06 15:53:15.269120067 +0200 +@@ -52,8 +52,8 @@ + # Allow either "# line" or "# " to support GCC's + # cpp output + # +- self.line_pattern = re.compile('([ \t]*line\W)|([ \t]*\d+)') +- self.pragma_pattern = re.compile('[ \t]*pragma\W') ++ self.line_pattern = re.compile(r'([ \t]*line\W)|([ \t]*\d+)') ++ self.pragma_pattern = re.compile(r'[ \t]*pragma\W') + + def build(self, **kwargs): + """ Builds the lexer from the specification. Must be diff --git a/python-pycparser.spec b/python-pycparser.spec index 588e386..77bf7d8 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -9,12 +9,14 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 18%{?dist} +Release: 19%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz Source1: pycparser-0.91.1-remove-relative-sys-path.py +Patch0: pycparser-2.14-rstring_fix.patch + Patch100: pycparser-2.10-ply.patch # This is Fedora-specific; I don't think we should request upstream to # remove embedded libraries from their distribuution, when we can remove @@ -64,6 +66,7 @@ need to parse C source code. %prep %setup -q -n pycparser-release_v%{version} +%patch0 -p1 %patch100 -p1 -F5 -b .ply # remove embedded copy of ply @@ -115,6 +118,9 @@ popd %endif # with_python3 %changelog +* Mon Jun 10 2019 Marcel Plch - 2.14-19 +- Avoid invalid unicode escape sequences in Py3.8 + * Tue Feb 26 2019 Christian Heimes - 2.14-18 - Add build dependency on cpp for unit tests - Add dependency on python-ply version to prevent "yacc table file version is out of date" From 7ea8ba4efc516a84b1c5037d3d1e3a13b8374c8b Mon Sep 17 00:00:00 2001 From: Marcel Plch Date: Mon, 10 Jun 2019 14:59:53 +0200 Subject: [PATCH 12/46] Backport aditional rstring fixes --- pycparser-2.14-rstring_fix.patch | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/pycparser-2.14-rstring_fix.patch b/pycparser-2.14-rstring_fix.patch index 2385ad3..49eb8bf 100644 --- a/pycparser-2.14-rstring_fix.patch +++ b/pycparser-2.14-rstring_fix.patch @@ -12,3 +12,49 @@ diff -ru pycparser-release_v2.14/pycparser/c_lexer.py pycparser-release_v2.14_pa def build(self, **kwargs): """ Builds the lexer from the specification. Must be +diff -ru pycparser-release_v2.14/pycparser/c_lexer.py.ply pycparser-release_v2.14_patched/pycparser/c_lexer.py.ply +--- pycparser-release_v2.14/pycparser/c_lexer.py.ply 2015-06-10 05:00:55.000000000 +0200 ++++ pycparser-release_v2.14_patched/pycparser/c_lexer.py.ply 2019-06-06 15:53:44.972385501 +0200 +@@ -52,8 +52,8 @@ + # Allow either "# line" or "# " to support GCC's + # cpp output + # +- self.line_pattern = re.compile('([ \t]*line\W)|([ \t]*\d+)') +- self.pragma_pattern = re.compile('[ \t]*pragma\W') ++ self.line_pattern = re.compile(r'([ \t]*line\W)|([ \t]*\d+)') ++ self.pragma_pattern = re.compile(r'[ \t]*pragma\W') + + def build(self, **kwargs): + """ Builds the lexer from the specification. Must be +diff -ru pycparser-release_v2.14/tests/test_c_lexer.py pycparser-release_v2.14_patched/tests/test_c_lexer.py +--- pycparser-release_v2.14/tests/test_c_lexer.py 2015-06-10 05:00:55.000000000 +0200 ++++ pycparser-release_v2.14_patched/tests/test_c_lexer.py 2019-06-10 14:57:24.981643354 +0200 +@@ -403,12 +403,12 @@ + self.assertLexerError("'b\n", ERR_UNMATCHED_QUOTE) + + self.assertLexerError("'jx'", ERR_INVALID_CCONST) +- self.assertLexerError("'\*'", ERR_INVALID_CCONST) ++ self.assertLexerError(r"'\*'", ERR_INVALID_CCONST) + + def test_string_literals(self): +- self.assertLexerError('"jx\9"', ERR_STRING_ESCAPE) +- self.assertLexerError('"hekllo\* on ix"', ERR_STRING_ESCAPE) +- self.assertLexerError('L"hekllo\* on ix"', ERR_STRING_ESCAPE) ++ self.assertLexerError(r'"jx\9"', ERR_STRING_ESCAPE) ++ self.assertLexerError(r'"hekllo\* on ix"', ERR_STRING_ESCAPE) ++ self.assertLexerError(r'L"hekllo\* on ix"', ERR_STRING_ESCAPE) + + def test_preprocessor(self): + self.assertLexerError('#line "ka"', ERR_FILENAME_BEFORE_LINE) +diff -ru pycparser-release_v2.14/tests/test_c_parser.py pycparser-release_v2.14_patched/tests/test_c_parser.py +--- pycparser-release_v2.14/tests/test_c_parser.py 2015-06-10 05:00:55.000000000 +0200 ++++ pycparser-release_v2.14_patched/tests/test_c_parser.py 2019-06-10 14:58:40.725330566 +0200 +@@ -1637,7 +1637,7 @@ + + self.assertTrue(isinstance(p.ext[0], Typedef)) + self.assertEqual(p.ext[0].coord.line, 213) +- self.assertEqual(p.ext[0].coord.file, "D:\eli\cpp_stuff\libc_include/stddef.h") ++ self.assertEqual(p.ext[0].coord.file, r"D:\eli\cpp_stuff\libc_include/stddef.h") + + self.assertTrue(isinstance(p.ext[-1], FuncDef)) + self.assertEqual(p.ext[-1].coord.line, 15) From 968b16f220f6782205e1ce4a3def76778a84ae49 Mon Sep 17 00:00:00 2001 From: Marcel Plch Date: Mon, 10 Jun 2019 15:35:30 +0200 Subject: [PATCH 13/46] Use upstream patch without the examples hunk. --- pycparser-2.14-rstring_fix.patch | 53 ++++++++++++++++---------------- python-pycparser.spec | 3 ++ 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/pycparser-2.14-rstring_fix.patch b/pycparser-2.14-rstring_fix.patch index 49eb8bf..92785e9 100644 --- a/pycparser-2.14-rstring_fix.patch +++ b/pycparser-2.14-rstring_fix.patch @@ -1,7 +1,20 @@ -diff -ru pycparser-release_v2.14/pycparser/c_lexer.py pycparser-release_v2.14_patched/pycparser/c_lexer.py ---- pycparser-release_v2.14/pycparser/c_lexer.py 2019-06-06 15:51:41.937286040 +0200 -+++ pycparser-release_v2.14_patched/pycparser/c_lexer.py 2019-06-06 15:53:15.269120067 +0200 -@@ -52,8 +52,8 @@ +From 2129f5fb1ec2d06000f10c96510874c5303d9f8c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Sun, 5 Mar 2017 04:52:22 +0200 +Subject: [PATCH] Python 3.6 invalid escape sequence deprecation fixes (#177) + +https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior +--- + pycparser/c_lexer.py | 4 ++-- + tests/test_c_lexer.py | 8 ++++---- + tests/test_c_parser.py | 2 +- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py +index 00dcd97..d9941c1 100644 +--- a/pycparser/c_lexer.py ++++ b/pycparser/c_lexer.py +@@ -52,8 +52,8 @@ def __init__(self, error_func, on_lbrace_func, on_rbrace_func, # Allow either "# line" or "# " to support GCC's # cpp output # @@ -12,24 +25,11 @@ diff -ru pycparser-release_v2.14/pycparser/c_lexer.py pycparser-release_v2.14_pa def build(self, **kwargs): """ Builds the lexer from the specification. Must be -diff -ru pycparser-release_v2.14/pycparser/c_lexer.py.ply pycparser-release_v2.14_patched/pycparser/c_lexer.py.ply ---- pycparser-release_v2.14/pycparser/c_lexer.py.ply 2015-06-10 05:00:55.000000000 +0200 -+++ pycparser-release_v2.14_patched/pycparser/c_lexer.py.ply 2019-06-06 15:53:44.972385501 +0200 -@@ -52,8 +52,8 @@ - # Allow either "# line" or "# " to support GCC's - # cpp output - # -- self.line_pattern = re.compile('([ \t]*line\W)|([ \t]*\d+)') -- self.pragma_pattern = re.compile('[ \t]*pragma\W') -+ self.line_pattern = re.compile(r'([ \t]*line\W)|([ \t]*\d+)') -+ self.pragma_pattern = re.compile(r'[ \t]*pragma\W') - - def build(self, **kwargs): - """ Builds the lexer from the specification. Must be -diff -ru pycparser-release_v2.14/tests/test_c_lexer.py pycparser-release_v2.14_patched/tests/test_c_lexer.py ---- pycparser-release_v2.14/tests/test_c_lexer.py 2015-06-10 05:00:55.000000000 +0200 -+++ pycparser-release_v2.14_patched/tests/test_c_lexer.py 2019-06-10 14:57:24.981643354 +0200 -@@ -403,12 +403,12 @@ +diff --git a/tests/test_c_lexer.py b/tests/test_c_lexer.py +index f965b24..11c7b26 100644 +--- a/tests/test_c_lexer.py ++++ b/tests/test_c_lexer.py +@@ -430,12 +430,12 @@ def test_char_constants(self): self.assertLexerError("'b\n", ERR_UNMATCHED_QUOTE) self.assertLexerError("'jx'", ERR_INVALID_CCONST) @@ -46,10 +46,11 @@ diff -ru pycparser-release_v2.14/tests/test_c_lexer.py pycparser-release_v2.14_p def test_preprocessor(self): self.assertLexerError('#line "ka"', ERR_FILENAME_BEFORE_LINE) -diff -ru pycparser-release_v2.14/tests/test_c_parser.py pycparser-release_v2.14_patched/tests/test_c_parser.py ---- pycparser-release_v2.14/tests/test_c_parser.py 2015-06-10 05:00:55.000000000 +0200 -+++ pycparser-release_v2.14_patched/tests/test_c_parser.py 2019-06-10 14:58:40.725330566 +0200 -@@ -1637,7 +1637,7 @@ +diff --git a/tests/test_c_parser.py b/tests/test_c_parser.py +index 95ae865..0835013 100755 +--- a/tests/test_c_parser.py ++++ b/tests/test_c_parser.py +@@ -1718,7 +1718,7 @@ def test_whole_file_with_stdio(self): self.assertTrue(isinstance(p.ext[0], Typedef)) self.assertEqual(p.ext[0].coord.line, 213) diff --git a/python-pycparser.spec b/python-pycparser.spec index 77bf7d8..4c74c99 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -15,6 +15,9 @@ URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz Source1: pycparser-0.91.1-remove-relative-sys-path.py +# Python no longer accepts certain escape sequences, because they get treated as +# unicode escape sequences. +# https://github.com/eliben/pycparser/commit/2129f5fb1ec2d06000f10c96510874c5303d9f8c Patch0: pycparser-2.14-rstring_fix.patch Patch100: pycparser-2.10-ply.patch From 65fa2e14e2372bc32a4f0187d40beb14372a4223 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 15:25:23 +0000 Subject: [PATCH 14/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 4c74c99..4d59d72 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -9,7 +9,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 19%{?dist} +Release: 20%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz @@ -121,6 +121,9 @@ popd %endif # with_python3 %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 2.14-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Mon Jun 10 2019 Marcel Plch - 2.14-19 - Avoid invalid unicode escape sequences in Py3.8 From c4e8e3e8bfe483de6f931943f7a8c97f5413eea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 16 Aug 2019 01:57:56 +0200 Subject: [PATCH 15/46] Rebuilt for Python 3.8 --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 4d59d72..a891cff 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -9,7 +9,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 20%{?dist} +Release: 21%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz @@ -121,6 +121,9 @@ popd %endif # with_python3 %changelog +* Thu Aug 15 2019 Miro Hrončok - 2.14-21 +- Rebuilt for Python 3.8 + * Fri Jul 26 2019 Fedora Release Engineering - 2.14-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From c2f4912b62987924232aea1b8f872815af1599ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 3 Oct 2019 14:24:30 +0200 Subject: [PATCH 16/46] Rebuilt for Python 3.8.0rc1 (#1748018) --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index a891cff..0e30fd0 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -9,7 +9,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 21%{?dist} +Release: 22%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz @@ -121,6 +121,9 @@ popd %endif # with_python3 %changelog +* Thu Oct 03 2019 Miro Hrončok - 2.14-22 +- Rebuilt for Python 3.8.0rc1 (#1748018) + * Thu Aug 15 2019 Miro Hrončok - 2.14-21 - Rebuilt for Python 3.8 From 61e907b722be5ae35adbaf9a5307f502c1909395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 20 Oct 2019 14:27:07 +0200 Subject: [PATCH 17/46] Subpackage python2-ply has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal --- python-pycparser.spec | 59 +++++++------------------------------------ 1 file changed, 9 insertions(+), 50 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 0e30fd0..f8006a8 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -1,7 +1,3 @@ -%if 0%{?fedora} || 0%{?rhel} >= 8 -%global with_python3 1 -%endif - # Ensure that pycparser uses the same YACC __tabversion__ as python-ply # package to prevent "yacc table file version is out of date" problem. %define ply_version %(LC_ALL=C rpm -q --qf '%%{VERSION}' python3-ply | grep -Eo '^[^.]+\.[^.]+') @@ -9,7 +5,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.14 -Release: 22%{?dist} +Release: 23%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz @@ -27,35 +23,18 @@ Patch100: pycparser-2.10-ply.patch BuildArch: noarch -BuildRequires: python2-devel python2-setuptools +BuildRequires: python3-devel python3-setuptools # for unit tests BuildRequires: dos2unix -BuildRequires: python2-ply >= 3.6 BuildRequires: cpp - -%if 0%{?with_python3} -BuildRequires: python3-devel python3-setuptools -# for unit tests -BuildRequires: python3-ply -%endif # if with_python3 +BuildRequires: python3-ply %description pycparser is a complete parser for the C language, written in pure Python. It is a module designed to be easily integrated into applications that need to parse C source code. -%package -n python2-pycparser -Summary: C parser and AST generator written in Python -Requires: python2-ply = %{ply_version} -%{?python_provide:%python_provide python2-pycparser} - -%description -n python2-pycparser -pycparser is a complete parser for the C language, written in pure Python. -It is a module designed to be easily integrated into applications that -need to parse C source code. - -%if 0%{?with_python3} %package -n python3-pycparser Summary: C parser and AST generator written in Python Requires: python3-ply = %{ply_version} @@ -65,7 +44,6 @@ Requires: python3-ply = %{ply_version} pycparser is a complete parser for the C language, written in pure Python. It is a module designed to be easily integrated into applications that need to parse C source code. -%endif # if with_python3 %prep %setup -q -n pycparser-release_v%{version} @@ -76,51 +54,32 @@ need to parse C source code. rm -rf pycparser/ply # examples -%{__python2} %{SOURCE1} examples +%{__python3} %{SOURCE1} examples dos2unix LICENSE %build -%py2_build -pushd build/lib/pycparser -%{__python2} _build_tables.py -popd - -%if 0%{?with_python3} %py3_build pushd build/lib/pycparser %{__python3} _build_tables.py popd -%endif # with_python3 %install -%py2_install - -%if 0%{?with_python3} %py3_install -%endif # with_python3 %check -%{__python2} tests/all_tests.py - -%if 0%{?with_python3} %{__python3} tests/all_tests.py -%endif # with_python3 -%files -n python2-pycparser -%license LICENSE -%doc examples -%{python2_sitelib}/pycparser/ -%{python2_sitelib}/pycparser-*.egg-info - -%if 0%{?with_python3} %files -n python3-pycparser %license LICENSE %doc examples %{python3_sitelib}/pycparser/ -%{python3_sitelib}/pycparser-*.egg-info -%endif # with_python3 +%{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Sun Oct 20 2019 Miro Hrončok - 2.14-23 +- Subpackage python2-ply has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + * Thu Oct 03 2019 Miro Hrončok - 2.14-22 - Rebuilt for Python 3.8.0rc1 (#1748018) From 7895b807ad146ca767508feb7ebd42fdf42bc5eb Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Fri, 8 Nov 2019 09:13:35 +0100 Subject: [PATCH 18/46] New usptream version 2.19 --- .gitignore | 1 + python-pycparser.spec | 23 +++++++++++++---------- sources | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 9898552..5a7db9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /release_v2.09.1.tar.gz /release_v2.10.tar.gz /release_v2.14.tar.gz +/release_v2.19.tar.gz diff --git a/python-pycparser.spec b/python-pycparser.spec index f8006a8..a2c3f93 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -2,20 +2,17 @@ # package to prevent "yacc table file version is out of date" problem. %define ply_version %(LC_ALL=C rpm -q --qf '%%{VERSION}' python3-ply | grep -Eo '^[^.]+\.[^.]+') +%bcond_without tests + Name: python-pycparser Summary: C parser and AST generator written in Python -Version: 2.14 -Release: 23%{?dist} +Version: 2.19 +Release: 1%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz Source1: pycparser-0.91.1-remove-relative-sys-path.py -# Python no longer accepts certain escape sequences, because they get treated as -# unicode escape sequences. -# https://github.com/eliben/pycparser/commit/2129f5fb1ec2d06000f10c96510874c5303d9f8c -Patch0: pycparser-2.14-rstring_fix.patch - Patch100: pycparser-2.10-ply.patch # This is Fedora-specific; I don't think we should request upstream to # remove embedded libraries from their distribuution, when we can remove @@ -24,11 +21,13 @@ Patch100: pycparser-2.10-ply.patch BuildArch: noarch BuildRequires: python3-devel python3-setuptools +BuildRequires: dos2unix +BuildRequires: python3-ply # for unit tests -BuildRequires: dos2unix +%if %{with tests} BuildRequires: cpp -BuildRequires: python3-ply +%endif %description pycparser is a complete parser for the C language, written in pure Python. @@ -47,7 +46,6 @@ need to parse C source code. %prep %setup -q -n pycparser-release_v%{version} -%patch0 -p1 %patch100 -p1 -F5 -b .ply # remove embedded copy of ply @@ -67,7 +65,9 @@ popd %py3_install %check +%if %{with tests} %{__python3} tests/all_tests.py +%endif %files -n python3-pycparser %license LICENSE @@ -76,6 +76,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Fri Nov 08 2019 Lumír Balhar - 2.19-1 +- New usptream version 2.19 + * Sun Oct 20 2019 Miro Hrončok - 2.14-23 - Subpackage python2-ply has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal diff --git a/sources b/sources index 01a75b8..9e5ebdb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dfa652c012a97ed0168889797873b73f release_v2.14.tar.gz +SHA512 (release_v2.19.tar.gz) = 88fe63c1a7a344c564dfd3b4f99735a4159c8a3f5738bab839943ea7fcbf1f5340f67326550b7e66508ea5862897e5bcdf363c2a8d47eccb50890573a2640a98 From ae7888d603ed0c3c5fe37efef25a98d9738f6f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Dec 2019 12:57:45 +0100 Subject: [PATCH 19/46] Remove unused patch --- pycparser-2.14-rstring_fix.patch | 61 -------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 pycparser-2.14-rstring_fix.patch diff --git a/pycparser-2.14-rstring_fix.patch b/pycparser-2.14-rstring_fix.patch deleted file mode 100644 index 92785e9..0000000 --- a/pycparser-2.14-rstring_fix.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 2129f5fb1ec2d06000f10c96510874c5303d9f8c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Sun, 5 Mar 2017 04:52:22 +0200 -Subject: [PATCH] Python 3.6 invalid escape sequence deprecation fixes (#177) - -https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior ---- - pycparser/c_lexer.py | 4 ++-- - tests/test_c_lexer.py | 8 ++++---- - tests/test_c_parser.py | 2 +- - 4 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py -index 00dcd97..d9941c1 100644 ---- a/pycparser/c_lexer.py -+++ b/pycparser/c_lexer.py -@@ -52,8 +52,8 @@ def __init__(self, error_func, on_lbrace_func, on_rbrace_func, - # Allow either "# line" or "# " to support GCC's - # cpp output - # -- self.line_pattern = re.compile('([ \t]*line\W)|([ \t]*\d+)') -- self.pragma_pattern = re.compile('[ \t]*pragma\W') -+ self.line_pattern = re.compile(r'([ \t]*line\W)|([ \t]*\d+)') -+ self.pragma_pattern = re.compile(r'[ \t]*pragma\W') - - def build(self, **kwargs): - """ Builds the lexer from the specification. Must be -diff --git a/tests/test_c_lexer.py b/tests/test_c_lexer.py -index f965b24..11c7b26 100644 ---- a/tests/test_c_lexer.py -+++ b/tests/test_c_lexer.py -@@ -430,12 +430,12 @@ def test_char_constants(self): - self.assertLexerError("'b\n", ERR_UNMATCHED_QUOTE) - - self.assertLexerError("'jx'", ERR_INVALID_CCONST) -- self.assertLexerError("'\*'", ERR_INVALID_CCONST) -+ self.assertLexerError(r"'\*'", ERR_INVALID_CCONST) - - def test_string_literals(self): -- self.assertLexerError('"jx\9"', ERR_STRING_ESCAPE) -- self.assertLexerError('"hekllo\* on ix"', ERR_STRING_ESCAPE) -- self.assertLexerError('L"hekllo\* on ix"', ERR_STRING_ESCAPE) -+ self.assertLexerError(r'"jx\9"', ERR_STRING_ESCAPE) -+ self.assertLexerError(r'"hekllo\* on ix"', ERR_STRING_ESCAPE) -+ self.assertLexerError(r'L"hekllo\* on ix"', ERR_STRING_ESCAPE) - - def test_preprocessor(self): - self.assertLexerError('#line "ka"', ERR_FILENAME_BEFORE_LINE) -diff --git a/tests/test_c_parser.py b/tests/test_c_parser.py -index 95ae865..0835013 100755 ---- a/tests/test_c_parser.py -+++ b/tests/test_c_parser.py -@@ -1718,7 +1718,7 @@ def test_whole_file_with_stdio(self): - - self.assertTrue(isinstance(p.ext[0], Typedef)) - self.assertEqual(p.ext[0].coord.line, 213) -- self.assertEqual(p.ext[0].coord.file, "D:\eli\cpp_stuff\libc_include/stddef.h") -+ self.assertEqual(p.ext[0].coord.file, r"D:\eli\cpp_stuff\libc_include/stddef.h") - - self.assertTrue(isinstance(p.ext[-1], FuncDef)) - self.assertEqual(p.ext[-1].coord.line, 15) From 21f812765cdcba79b5c55d7ec7bb0d05153287e1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 14:19:13 +0000 Subject: [PATCH 20/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index a2c3f93..2508d97 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -7,7 +7,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.19 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz @@ -76,6 +76,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 2.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Fri Nov 08 2019 Lumír Balhar - 2.19-1 - New usptream version 2.19 From 6277a86fb0790d70d7404b154f58e11f8d68f74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 23 May 2020 04:38:10 +0200 Subject: [PATCH 21/46] Rebuilt for Python 3.9 --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 2508d97..7431836 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -7,7 +7,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.19 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz @@ -76,6 +76,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Sat May 23 2020 Miro Hrončok - 2.19-3 +- Rebuilt for Python 3.9 + * Thu Jan 30 2020 Fedora Release Engineering - 2.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 564c924f13313063a4a9e7101dea2dce7581485d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 5 Jun 2020 22:32:34 +0200 Subject: [PATCH 22/46] Update to 2.20 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1810349 Avoid calling `rpm` to get ply version info: https://pagure.io/packaging-committee/pull-request/954 Drop no longer needed dos2unix. Switch to %autosetup. Switch to %python3. --- .gitignore | 1 + pycparser-2.10-ply.patch | 38 --------------------------- pycparser-unbundle-ply.patch | 51 ++++++++++++++++++++++++++++++++++++ python-pycparser.spec | 38 +++++++++++++-------------- sources | 2 +- 5 files changed, 71 insertions(+), 59 deletions(-) delete mode 100644 pycparser-2.10-ply.patch create mode 100644 pycparser-unbundle-ply.patch diff --git a/.gitignore b/.gitignore index 5a7db9d..3b31a6b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /release_v2.10.tar.gz /release_v2.14.tar.gz /release_v2.19.tar.gz +/release_v2.20.tar.gz diff --git a/pycparser-2.10-ply.patch b/pycparser-2.10-ply.patch deleted file mode 100644 index d1e1f53..0000000 --- a/pycparser-2.10-ply.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -up pycparser-release_v2.10/pycparser/c_lexer.py.ply pycparser-release_v2.10/pycparser/c_lexer.py ---- pycparser-release_v2.10/pycparser/c_lexer.py.ply 2013-08-03 07:15:32.000000000 -0600 -+++ pycparser-release_v2.10/pycparser/c_lexer.py 2014-08-20 12:40:48.308461164 -0600 -@@ -9,8 +9,8 @@ - import re - import sys - --from .ply import lex --from .ply.lex import TOKEN -+from ply import lex -+from ply.lex import TOKEN - - - class CLexer(object): -diff -up pycparser-release_v2.10/pycparser/c_parser.py.ply pycparser-release_v2.10/pycparser/c_parser.py ---- pycparser-release_v2.10/pycparser/c_parser.py.ply 2013-08-03 07:15:32.000000000 -0600 -+++ pycparser-release_v2.10/pycparser/c_parser.py 2014-08-20 12:40:05.154894980 -0600 -@@ -8,7 +8,7 @@ - #------------------------------------------------------------------------------ - import re - --from .ply import yacc -+from ply import yacc - - from . import c_ast - from .c_lexer import CLexer -diff -up pycparser-release_v2.10/setup.py.ply pycparser-release_v2.10/setup.py ---- pycparser-release_v2.10/setup.py.ply 2013-08-03 07:15:32.000000000 -0600 -+++ pycparser-release_v2.10/setup.py 2014-08-20 12:40:05.154894980 -0600 -@@ -22,7 +22,7 @@ setup( - classifiers = [ - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 3',], -- packages=['pycparser', 'pycparser.ply'], -+ packages=['pycparser'], - package_data={'pycparser': ['*.cfg']}, - ) - diff --git a/pycparser-unbundle-ply.patch b/pycparser-unbundle-ply.patch new file mode 100644 index 0000000..0f0cd6b --- /dev/null +++ b/pycparser-unbundle-ply.patch @@ -0,0 +1,51 @@ +diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py +index 045d24e..9b3cbf2 100644 +--- a/pycparser/c_lexer.py ++++ b/pycparser/c_lexer.py +@@ -9,8 +9,8 @@ + import re + import sys + +-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 744ede8..50156a3 100644 +--- a/pycparser/c_parser.py ++++ b/pycparser/c_parser.py +@@ -8,7 +8,7 @@ + #------------------------------------------------------------------------------ + import re + +-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 6dce89c..b3dbfb4 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.6', + ], + python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", +- 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 7431836..32c315d 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -1,27 +1,25 @@ -# Ensure that pycparser uses the same YACC __tabversion__ as python-ply -# package to prevent "yacc table file version is out of date" problem. -%define ply_version %(LC_ALL=C rpm -q --qf '%%{VERSION}' python3-ply | grep -Eo '^[^.]+\.[^.]+') - %bcond_without tests Name: python-pycparser Summary: C parser and AST generator written in Python -Version: 2.19 -Release: 3%{?dist} +Version: 2.20 +Release: 1%{?dist} License: BSD URL: http://github.com/eliben/pycparser -Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz +Source0: %{url}/archive/release_v%{version}.tar.gz Source1: pycparser-0.91.1-remove-relative-sys-path.py -Patch100: pycparser-2.10-ply.patch # This is Fedora-specific; I don't think we should request upstream to # remove embedded libraries from their distribuution, 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 python3-setuptools -BuildRequires: dos2unix +BuildRequires: python3-devel +BuildRequires: python3-setuptools BuildRequires: python3-ply # for unit tests @@ -35,8 +33,7 @@ It is a module designed to be easily integrated into applications that need to parse C source code. %package -n python3-pycparser -Summary: C parser and AST generator written in Python -Requires: python3-ply = %{ply_version} +Summary: %{summary} %{?python_provide:%python_provide python3-pycparser} %description -n python3-pycparser @@ -45,20 +42,18 @@ It is a module designed to be easily integrated into applications that need to parse C source code. %prep -%setup -q -n pycparser-release_v%{version} -%patch100 -p1 -F5 -b .ply +%autosetup -p1 -n pycparser-release_v%{version} # remove embedded copy of ply -rm -rf pycparser/ply +rm -r pycparser/ply -# examples -%{__python3} %{SOURCE1} examples -dos2unix LICENSE +# Remove relative sys.path from the examples +%{python3} %{SOURCE1} examples %build %py3_build pushd build/lib/pycparser -%{__python3} _build_tables.py +%{python3} _build_tables.py popd %install @@ -66,7 +61,7 @@ popd %check %if %{with tests} -%{__python3} tests/all_tests.py +%{python3} tests/all_tests.py %endif %files -n python3-pycparser @@ -76,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Fri Jun 05 2020 Miro Hrončok - 2.20-1 +- Update to 2.20 (#1810349) + * Sat May 23 2020 Miro Hrončok - 2.19-3 - Rebuilt for Python 3.9 diff --git a/sources b/sources index 9e5ebdb..4789666 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (release_v2.19.tar.gz) = 88fe63c1a7a344c564dfd3b4f99735a4159c8a3f5738bab839943ea7fcbf1f5340f67326550b7e66508ea5862897e5bcdf363c2a8d47eccb50890573a2640a98 +SHA512 (release_v2.20.tar.gz) = d2dc48727750ec0a80d5e3b0c9fba390c3647416a3e18cad59429edb9f55d043c7695c52301b037c93af5d96ffc85fcba7cd54d376abdb89e973759c59fa189d From f36507af64619b2d3026b0b3004dbaa738fe480f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 03:00:50 +0000 Subject: [PATCH 23/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 32c315d..60e45d4 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 2.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jun 05 2020 Miro Hrončok - 2.20-1 - Update to 2.20 (#1810349) From f7ddb34525e92a34e9e07df04a0abb74955e0d31 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 12:31:05 +0000 Subject: [PATCH 24/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 60e45d4..0c0f7c6 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 2.20-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 2.20-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 9803c41abb034a0ba13854361f72d654ede068a8 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 3 Jun 2021 00:39:39 +0200 Subject: [PATCH 25/46] Rebuilt for Python 3.10 --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 0c0f7c6..4126fbf 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Wed Jun 02 2021 Python Maint - 2.20-4 +- Rebuilt for Python 3.10 + * Wed Jan 27 2021 Fedora Release Engineering - 2.20-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From e42f21961cc83236a1c02d79a29b0ad440fc178c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 27 Jul 2021 08:20:31 +0000 Subject: [PATCH 26/46] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 4126fbf..ea920ab 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 4%{?dist} +Release: 5%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,10 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Tue Jul 27 2021 Fedora Release Engineering - 2.20-5 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jun 02 2021 Python Maint - 2.20-4 - Rebuilt for Python 3.10 From 1723ac39b530ca7bebaa2e33ee9233f994dbbc12 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 14:26:58 +0000 Subject: [PATCH 27/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index ea920ab..6b1b070 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 5%{?dist} +Release: 6%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 2.20-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Jul 27 2021 Fedora Release Engineering - 2.20-5 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From bb234880a3b48f171b48b8bb810c47f2d91d7605 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 16:02:12 +0200 Subject: [PATCH 28/46] Rebuilt for Python 3.11 --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 6b1b070..fd84f38 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 6%{?dist} +Release: 7%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Mon Jun 13 2022 Python Maint - 2.20-7 +- Rebuilt for Python 3.11 + * Fri Jan 21 2022 Fedora Release Engineering - 2.20-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 4ad5dc46de0e788f4b1f0c56c7359a879ddc7b61 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 21:09:53 +0000 Subject: [PATCH 29/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index fd84f38..a5cbddf 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 7%{?dist} +Release: 8%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 2.20-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 2.20-7 - Rebuilt for Python 3.11 From 8e619c259dbb996071ce818b4ecb10f42364c5e9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 15:59:19 +0000 Subject: [PATCH 30/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index a5cbddf..2c4e012 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 8%{?dist} +Release: 9%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 2.20-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Jul 22 2022 Fedora Release Engineering - 2.20-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From d9ec9c2d382fd3f1b35893fc7a61449d821d999f Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 21:36:58 +0200 Subject: [PATCH 31/46] Rebuilt for Python 3.12 --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 2c4e012..d54fa6e 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 9%{?dist} +Release: 10%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Tue Jun 13 2023 Python Maint - 2.20-10 +- Rebuilt for Python 3.12 + * Fri Jan 20 2023 Fedora Release Engineering - 2.20-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 3bbf1df6e8d7f4a09b31848bf4ce518013db7539 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 12:38:03 +0000 Subject: [PATCH 32/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index d54fa6e..5c56ebb 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 10%{?dist} +Release: 11%{?dist} License: BSD URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 2.20-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jun 13 2023 Python Maint - 2.20-10 - Rebuilt for Python 3.12 From dd1d7427d9baa5aa1595fc0086592d0ad2433e86 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 22 Aug 2023 13:27:14 -0400 Subject: [PATCH 33/46] migrated to SPDX license I used the FF addon SPDX License Diff to help identify the variant --- python-pycparser.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 5c56ebb..4bf0cfa 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,8 +3,8 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 11%{?dist} -License: BSD +Release: 12%{?dist} +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 @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Tue Aug 22 2023 Rob Crittenden - 2.20-12 +- migrated to SPDX license + * Fri Jul 21 2023 Fedora Release Engineering - 2.20-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From a4b36b2441be261d68d4f2565fc03dbedee363ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Fri, 12 Jan 2024 12:16:59 +0100 Subject: [PATCH 34/46] Fix typo --- python-pycparser.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 4bf0cfa..3b6c4f7 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -10,7 +10,7 @@ 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 distribuution, when we can remove +# 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. From a5b45a408695859a4c1fbaa10663bc6be4ae5edd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 05:26:52 +0000 Subject: [PATCH 35/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 3b6c4f7..dcd4861 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 12%{?dist} +Release: 13%{?dist} License: BSD-3-Clause URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 2.20-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Tue Aug 22 2023 Rob Crittenden - 2.20-12 - migrated to SPDX license From 34b6c1f4e9d834970f9dfd413e3a0255b92eae6f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 08:26:26 +0000 Subject: [PATCH 36/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pycparser.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index dcd4861..7155a39 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 13%{?dist} +Release: 14%{?dist} License: BSD-3-Clause URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,6 +71,9 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 2.20-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 2.20-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 2ee397e71f41b2c78327bced3fdfdeeff684fdfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 29 Jan 2024 15:39:00 +0100 Subject: [PATCH 37/46] Convert to %autorelease and %autochangelog [skip changelog] --- changelog | 163 +++++++++++++++++++++++++++++++++++++++++ python-pycparser.spec | 166 +----------------------------------------- 2 files changed, 165 insertions(+), 164 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..3966e26 --- /dev/null +++ b/changelog @@ -0,0 +1,163 @@ +* Fri Jan 26 2024 Fedora Release Engineering - 2.20-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 2.20-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Aug 22 2023 Rob Crittenden - 2.20-12 +- migrated to SPDX license + +* Fri Jul 21 2023 Fedora Release Engineering - 2.20-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 2.20-10 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 2.20-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 2.20-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 2.20-7 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 2.20-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Jul 27 2021 Fedora Release Engineering - 2.20-5 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jun 02 2021 Python Maint - 2.20-4 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.20-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 2.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jun 05 2020 Miro Hrončok - 2.20-1 +- Update to 2.20 (#1810349) + +* Sat May 23 2020 Miro Hrončok - 2.19-3 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 2.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Nov 08 2019 Lumír Balhar - 2.19-1 +- New usptream version 2.19 + +* Sun Oct 20 2019 Miro Hrončok - 2.14-23 +- Subpackage python2-ply has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Thu Oct 03 2019 Miro Hrončok - 2.14-22 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Thu Aug 15 2019 Miro Hrončok - 2.14-21 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 2.14-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jun 10 2019 Marcel Plch - 2.14-19 +- Avoid invalid unicode escape sequences in Py3.8 + +* Tue Feb 26 2019 Christian Heimes - 2.14-18 +- Add build dependency on cpp for unit tests +- Add dependency on python-ply version to prevent "yacc table file version is out of date" +- Fixes RHBZ#1668230 + +* Sat Feb 02 2019 Fedora Release Engineering - 2.14-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 2.14-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jun 15 2018 Miro Hrončok - 2.14-15 +- Rebuilt for Python 3.7 + +* Mon Feb 12 2018 Iryna Shcherbina - 2.14-14 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 2.14-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Sep 27 2017 Troy Dawson - 2.14-12 +- Cleanup spec file conditionals + +* Thu Jul 27 2017 Fedora Release Engineering - 2.14-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 2.14-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jan 6 2017 Orion Poplawski - 2.14-9 +- Ship python2-pycparser +- Modernize spec + +* Fri Dec 09 2016 Charalampos Stratakis - 2.14-8 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 2.14-7 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Fri Jul 8 2016 Tom Callaway - 2.14-6 +- rebuild to update yacctab.py + +* Thu Feb 04 2016 Fedora Release Engineering - 2.14-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Oct 13 2015 Robert Kuska - 2.14-4 +- Rebuilt for Python3.5 rebuild + +* Tue Jul 14 2015 Stephen Gallagher - 2.14-3 +- Rebuild alongside python-ply 3.6 + +* Thu Jun 18 2015 Fedora Release Engineering - 2.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Jun 09 2015 Nathaniel McCallum - 2.14-1 +- Update to 2.14 + +* Wed Aug 20 2014 Eric Smith 2.10-1 +- Update to latest upstream. + +* Sat Jun 07 2014 Fedora Release Engineering - 2.09.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon May 12 2014 Bohuslav Kabrda - 2.09.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 + +* Sun Aug 04 2013 Fedora Release Engineering - 2.09.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 23 2013 Eric Smith 2.09.1-6 +- Added Python 3 support. + +* Mon Jul 22 2013 Eric Smith 2.09.1-5 +- Renumbered Fedora-specific Patch1 to Patch100 +- Added new Patch1 to fix table generation when the build system + already has a python-pycparser package installed. +- Submitted Patch0 and Patch1 as upstream issues. +- Added comments about patches. + +* Sun Jul 21 2013 Eric Smith 2.09.1-4 +- Upstream repository is now on github. +- Fix rpmlint strange-permission complaint. +- Rename patches, Source1 to all start with pycparser-{version}, to + simplify updating patches for future upstream releases. + +* Sun Jul 21 2013 Eric Smith 2.09.1-3 +- Run _build_tables.py to build the lextab.py and yacctab.py; otherwise + they have to be regenerated at runtime for no benefit. + +* Tue Mar 19 2013 Jos de Kloe 2.09.1-2 +- remove the embedded ply code + +* Fri Jan 18 2013 Scott Tsai 2.09.1-1 +- upstream 2.09.1 diff --git a/python-pycparser.spec b/python-pycparser.spec index 7155a39..09b55f8 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -3,7 +3,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python Version: 2.20 -Release: 14%{?dist} +Release: %autorelease License: BSD-3-Clause URL: http://github.com/eliben/pycparser Source0: %{url}/archive/release_v%{version}.tar.gz @@ -71,166 +71,4 @@ popd %{python3_sitelib}/pycparser-*.egg-info/ %changelog -* Fri Jan 26 2024 Fedora Release Engineering - 2.20-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Jan 22 2024 Fedora Release Engineering - 2.20-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Tue Aug 22 2023 Rob Crittenden - 2.20-12 -- migrated to SPDX license - -* Fri Jul 21 2023 Fedora Release Engineering - 2.20-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 13 2023 Python Maint - 2.20-10 -- Rebuilt for Python 3.12 - -* Fri Jan 20 2023 Fedora Release Engineering - 2.20-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 2.20-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 2.20-7 -- Rebuilt for Python 3.11 - -* Fri Jan 21 2022 Fedora Release Engineering - 2.20-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Tue Jul 27 2021 Fedora Release Engineering - 2.20-5 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jun 02 2021 Python Maint - 2.20-4 -- Rebuilt for Python 3.10 - -* Wed Jan 27 2021 Fedora Release Engineering - 2.20-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 2.20-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jun 05 2020 Miro Hrončok - 2.20-1 -- Update to 2.20 (#1810349) - -* Sat May 23 2020 Miro Hrončok - 2.19-3 -- Rebuilt for Python 3.9 - -* Thu Jan 30 2020 Fedora Release Engineering - 2.19-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Nov 08 2019 Lumír Balhar - 2.19-1 -- New usptream version 2.19 - -* Sun Oct 20 2019 Miro Hrončok - 2.14-23 -- Subpackage python2-ply has been removed - See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Thu Oct 03 2019 Miro Hrončok - 2.14-22 -- Rebuilt for Python 3.8.0rc1 (#1748018) - -* Thu Aug 15 2019 Miro Hrončok - 2.14-21 -- Rebuilt for Python 3.8 - -* Fri Jul 26 2019 Fedora Release Engineering - 2.14-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Mon Jun 10 2019 Marcel Plch - 2.14-19 -- Avoid invalid unicode escape sequences in Py3.8 - -* Tue Feb 26 2019 Christian Heimes - 2.14-18 -- Add build dependency on cpp for unit tests -- Add dependency on python-ply version to prevent "yacc table file version is out of date" -- Fixes RHBZ#1668230 - -* Sat Feb 02 2019 Fedora Release Engineering - 2.14-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 2.14-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Jun 15 2018 Miro Hrončok - 2.14-15 -- Rebuilt for Python 3.7 - -* Mon Feb 12 2018 Iryna Shcherbina - 2.14-14 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Fri Feb 09 2018 Fedora Release Engineering - 2.14-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Sep 27 2017 Troy Dawson - 2.14-12 -- Cleanup spec file conditionals - -* Thu Jul 27 2017 Fedora Release Engineering - 2.14-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 2.14-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Jan 6 2017 Orion Poplawski - 2.14-9 -- Ship python2-pycparser -- Modernize spec - -* Fri Dec 09 2016 Charalampos Stratakis - 2.14-8 -- Rebuild for Python 3.6 - -* Tue Jul 19 2016 Fedora Release Engineering - 2.14-7 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Fri Jul 8 2016 Tom Callaway - 2.14-6 -- rebuild to update yacctab.py - -* Thu Feb 04 2016 Fedora Release Engineering - 2.14-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Oct 13 2015 Robert Kuska - 2.14-4 -- Rebuilt for Python3.5 rebuild - -* Tue Jul 14 2015 Stephen Gallagher - 2.14-3 -- Rebuild alongside python-ply 3.6 - -* Thu Jun 18 2015 Fedora Release Engineering - 2.14-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Tue Jun 09 2015 Nathaniel McCallum - 2.14-1 -- Update to 2.14 - -* Wed Aug 20 2014 Eric Smith 2.10-1 -- Update to latest upstream. - -* Sat Jun 07 2014 Fedora Release Engineering - 2.09.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Mon May 12 2014 Bohuslav Kabrda - 2.09.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 - -* Sun Aug 04 2013 Fedora Release Engineering - 2.09.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 23 2013 Eric Smith 2.09.1-6 -- Added Python 3 support. - -* Mon Jul 22 2013 Eric Smith 2.09.1-5 -- Renumbered Fedora-specific Patch1 to Patch100 -- Added new Patch1 to fix table generation when the build system - already has a python-pycparser package installed. -- Submitted Patch0 and Patch1 as upstream issues. -- Added comments about patches. - -* Sun Jul 21 2013 Eric Smith 2.09.1-4 -- Upstream repository is now on github. -- Fix rpmlint strange-permission complaint. -- Rename patches, Source1 to all start with pycparser-{version}, to - simplify updating patches for future upstream releases. - -* Sun Jul 21 2013 Eric Smith 2.09.1-3 -- Run _build_tables.py to build the lextab.py and yacctab.py; otherwise - they have to be regenerated at runtime for no benefit. - -* Tue Mar 19 2013 Jos de Kloe 2.09.1-2 -- remove the embedded ply code - -* Fri Jan 18 2013 Scott Tsai 2.09.1-1 -- upstream 2.09.1 +%autochangelog From 4b38e6263c691b62b082b1781636fc4770efc6ac Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 09:50:29 +0200 Subject: [PATCH 38/46] Rebuilt for Python 3.13 From deaf34f9095a1df3b06739a0813a617c42b95af1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 14:23:37 +0000 Subject: [PATCH 39/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 7ad90ebb6714eb536509029aa1a2089588f90358 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 17:38:18 +0000 Subject: [PATCH 40/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 849fc5116982cdd3d9118b6f3c13e9d1dd6ced4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 19 Mar 2025 18:47:12 +0100 Subject: [PATCH 41/46] Convert to pyproject RPM macros [skip changelog] --- python-pycparser.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 09b55f8..a929c7e 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -19,7 +19,6 @@ Patch100: pycparser-unbundle-ply.patch BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3-setuptools BuildRequires: python3-ply # for unit tests @@ -34,7 +33,6 @@ need to parse C source code. %package -n python3-pycparser Summary: %{summary} -%{?python_provide:%python_provide python3-pycparser} %description -n python3-pycparser pycparser is a complete parser for the C language, written in pure Python. @@ -50,25 +48,27 @@ rm -r pycparser/ply # Remove relative sys.path from the examples %{python3} %{SOURCE1} examples +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build -pushd build/lib/pycparser +pushd pycparser %{python3} _build_tables.py popd +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files -l pycparser %check +%pyproject_check_import %if %{with tests} %{python3} tests/all_tests.py %endif -%files -n python3-pycparser -%license LICENSE +%files -n python3-pycparser -f %{pyproject_files} %doc examples -%{python3_sitelib}/pycparser/ -%{python3_sitelib}/pycparser-*.egg-info/ %changelog %autochangelog From c93909460d82b28d493cdfb180bbd693b81f3f7c Mon Sep 17 00:00:00 2001 From: Matthieu Saulnier Date: Fri, 10 Jan 2025 20:59:54 +0100 Subject: [PATCH 42/46] Update to 2.22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixes: rhbz#2020936 Co-Authored-By: Miro Hrončok --- .gitignore | 1 + pycparser-unbundle-ply.patch | 20 ++++++++++---------- python-pycparser.spec | 6 +++--- sources | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 3b31a6b..fd4950b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /release_v2.14.tar.gz /release_v2.19.tar.gz /release_v2.20.tar.gz +/release_v2.22.tar.gz diff --git a/pycparser-unbundle-ply.patch b/pycparser-unbundle-ply.patch index 0f0cd6b..5abbf72 100644 --- a/pycparser-unbundle-ply.patch +++ b/pycparser-unbundle-ply.patch @@ -1,10 +1,10 @@ diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py -index 045d24e..9b3cbf2 100644 +index 22c64bc..a97c5d1 100644 --- a/pycparser/c_lexer.py +++ b/pycparser/c_lexer.py -@@ -9,8 +9,8 @@ +@@ -8,8 +8,8 @@ + #------------------------------------------------------------------------------ import re - import sys -from .ply import lex -from .ply.lex import TOKEN @@ -14,20 +14,20 @@ index 045d24e..9b3cbf2 100644 class CLexer(object): diff --git a/pycparser/c_parser.py b/pycparser/c_parser.py -index 744ede8..50156a3 100644 +index d31574a..5fc3544 100644 --- a/pycparser/c_parser.py +++ b/pycparser/c_parser.py -@@ -8,7 +8,7 @@ +@@ -6,7 +6,7 @@ + # Eli Bendersky [https://eli.thegreenplace.net/] + # License: BSD #------------------------------------------------------------------------------ - import re - -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 6dce89c..b3dbfb4 100644 +index f7e89bf..f78f559 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,8 @@ except ImportError: @@ -40,9 +40,9 @@ index 6dce89c..b3dbfb4 100644 def _run_build_tables(dir): from subprocess import check_call @@ -60,7 +62,8 @@ setup( - 'Programming Language :: Python :: 3.6', + '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'], + install_requires=['ply==' + ply.__version__], diff --git a/python-pycparser.spec b/python-pycparser.spec index a929c7e..aa370d5 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -2,7 +2,7 @@ Name: python-pycparser Summary: C parser and AST generator written in Python -Version: 2.20 +Version: 2.22 Release: %autorelease License: BSD-3-Clause URL: http://github.com/eliben/pycparser @@ -23,7 +23,7 @@ BuildRequires: python3-ply # for unit tests %if %{with tests} -BuildRequires: cpp +BuildRequires: gcc %endif %description @@ -64,7 +64,7 @@ popd %check %pyproject_check_import %if %{with tests} -%{python3} tests/all_tests.py +%py3_test_envvars %{python3} -m unittest discover %endif %files -n python3-pycparser -f %{pyproject_files} diff --git a/sources b/sources index 4789666..14d685c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (release_v2.20.tar.gz) = d2dc48727750ec0a80d5e3b0c9fba390c3647416a3e18cad59429edb9f55d043c7695c52301b037c93af5d96ffc85fcba7cd54d376abdb89e973759c59fa189d +SHA512 (release_v2.22.tar.gz) = 1c5be2b83c0a892cafa55a2595942d7048994772dc0fc71d2943004b4198d939c0bf2a164d763d94fe11d532e49371c59c1cf4037c32dab8d3cf0c553a8de64a From f745d05edd0f4b686cb52361ee991fc122efdd25 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 20:49:09 +0200 Subject: [PATCH 43/46] Rebuilt for Python 3.14 From df3e77868a1ae51ec2da5304081e593f41df5199 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 09:33:32 +0000 Subject: [PATCH 44/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 34c9453d0d63e884e688348db4f750fadecfc9dd Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 14:28:21 +0200 Subject: [PATCH 45/46] Rebuilt for Python 3.14.0rc2 bytecode From 6f3d2e300712cc51290dc515b3c3b2c2b894907e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 14:04:01 +0200 Subject: [PATCH 46/46] Rebuilt for Python 3.14.0rc3 bytecode