File: system_ply.diff

package info (click to toggle)
sip6 6.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,880 kB
  • sloc: ansic: 175,824; python: 19,041; makefile: 23; cpp: 8
file content (47 lines) | stat: -rw-r--r-- 1,691 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From: Dmitry Shachnev <mitya57@debian.org>
Date: Wed, 20 Dec 2023 21:52:02 +0300
Subject: Use system ply module instead of the bundled one

Also, pass write_tables=False because we generate parsetab.py during build.

Forwarded: not-needed
---
 sipbuild/generator/parser/parser_manager.py | 4 ++--
 sipbuild/generator/parser/tokens.py         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sipbuild/generator/parser/parser_manager.py b/sipbuild/generator/parser/parser_manager.py
index 0f1d771..202c243 100644
--- a/sipbuild/generator/parser/parser_manager.py
+++ b/sipbuild/generator/parser/parser_manager.py
@@ -28,7 +28,7 @@ from ..utils import (argument_as_str, cached_name, find_iface_file,
 from . import rules
 from . import tokens
 from .annotations import InvalidAnnotation, validate_annotation_value
-from .ply import lex, yacc
+from ply import lex, yacc
 
 class ParserManager:
     """ This object manages the actual lexer and parser objects providing them
@@ -45,7 +45,7 @@ class ParserManager:
         self._lexer.pm = self
 
         # Create the parser.
-        self._parser = yacc.yacc(module=rules, debug=False)
+        self._parser = yacc.yacc(module=rules, debug=False, write_tables=False)
         self._parser.pm = self
 
         # This is a hack to give p_error() access to the current parser object.
diff --git a/sipbuild/generator/parser/tokens.py b/sipbuild/generator/parser/tokens.py
index ddb1aaa..282c6dd 100644
--- a/sipbuild/generator/parser/tokens.py
+++ b/sipbuild/generator/parser/tokens.py
@@ -5,7 +5,7 @@
 
 from ..specification import CodeBlock
 
-from .ply.lex import TOKEN
+from ply.lex import TOKEN
 
 
 # The lexer states.