Avoid invalid unicode escape sequences in Py3.8

This commit is contained in:
Marcel Plch 2019-06-10 11:24:27 +02:00
parent abd777e474
commit 268b1571b3
2 changed files with 21 additions and 1 deletions

View File

@ -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 "# <num>" 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

View File

@ -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 <mplch@redhat.com> - 2.14-19
- Avoid invalid unicode escape sequences in Py3.8
* Tue Feb 26 2019 Christian Heimes <cheimes@redhat.com> - 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"