Replace whole repo with latest content from branch stream-2.19-rhel-8.8.0

This commit is contained in:
Honza Horak 2023-05-15 21:48:16 +02:00 committed by root
parent 3ceb50e1fc
commit 73b93e83f0
6 changed files with 62 additions and 79 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/release_v2.19.tar.gz
/release_v2.19.tar.gz

View File

@ -0,0 +1 @@
141582eb2a5ad9fee9bb7646cecb024f0406be8a release_v2.19.tar.gz

View File

@ -1,7 +0,0 @@
# recipients: abokovoy, frenaud, kaleem, ftrivino, cheimes
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -0,0 +1,61 @@
From 2129f5fb1ec2d06000f10c96510874c5303d9f8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
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 "# <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
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)

View File

@ -1,51 +0,0 @@
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},
)

View File

@ -1,20 +0,0 @@
---
- hosts: localhost
tags:
- classic
pre_tasks:
- name: Install dos2unix to build the sources
package:
name: dos2unix
state: present
roles:
- role: standard-test-source
- role: standard-test-basic
required_packages:
- python3-pycparser
- python3-pytest
- cpp
tests:
- unittests:
dir: "source"
run: "rm -rf pycparser && pytest-3 tests/"