File: Use-system-ply-instead-of-local-copy.patch

package info (click to toggle)
astropy 7.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,832 kB
  • sloc: python: 238,140; ansic: 55,278; lex: 8,621; sh: 3,317; xml: 2,287; makefile: 191
file content (30 lines) | stat: -rw-r--r-- 1,155 bytes parent folder | download
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
From: Ole Streicher <olebole@debian.org>
Date: Fri, 12 Jun 2020 17:13:16 +0200
Subject: Use system ply instead of local copy

---
 astropy/utils/parsing.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/astropy/utils/parsing.py b/astropy/utils/parsing.py
index 28321ca..4a72211 100644
--- a/astropy/utils/parsing.py
+++ b/astropy/utils/parsing.py
@@ -89,7 +89,7 @@ def lex(lextab: str, package: str, reflags: int = int(re.VERBOSE)) -> Lexer:
     reflags : int
         Passed to ``ply.lex``.
     """
-    from astropy.extern.ply import lex
+    from ply import lex
 
     caller_dir = Path(lex.get_caller_module_dict(2)["__file__"]).parent
     with _LOCK, _patch_ply_module(lex, caller_dir / (lextab + ".py"), package):
@@ -136,7 +136,7 @@ def yacc(tabmodule: str, package: str) -> ThreadSafeParser:
         the output file. This is inserted into a comment in the generated
         file.
     """
-    from astropy.extern.ply import yacc
+    from ply import yacc
 
     caller_dir = Path(yacc.get_caller_module_dict(2)["__file__"]).parent
     with _LOCK, _patch_ply_module(yacc, caller_dir / (tabmodule + ".py"), package):