Blame SOURCES/pycparser-unbundle-ply.patch

ec62e4
diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py
ec62e4
index 045d24e..9b3cbf2 100644
ec62e4
--- a/pycparser/c_lexer.py
ec62e4
+++ b/pycparser/c_lexer.py
ec62e4
@@ -9,8 +9,8 @@
ec62e4
 import re
ec62e4
 import sys
ec62e4
 
ec62e4
-from .ply import lex
ec62e4
-from .ply.lex import TOKEN
ec62e4
+from ply import lex
ec62e4
+from ply.lex import TOKEN
ec62e4
 
ec62e4
 
ec62e4
 class CLexer(object):
ec62e4
diff --git a/pycparser/c_parser.py b/pycparser/c_parser.py
ec62e4
index 744ede8..50156a3 100644
ec62e4
--- a/pycparser/c_parser.py
ec62e4
+++ b/pycparser/c_parser.py
ec62e4
@@ -8,7 +8,7 @@
ec62e4
 #------------------------------------------------------------------------------
ec62e4
 import re
ec62e4
 
ec62e4
-from .ply import yacc
ec62e4
+from ply import yacc
ec62e4
 
ec62e4
 from . import c_ast
ec62e4
 from .c_lexer import CLexer
ec62e4
diff --git a/setup.py b/setup.py
ec62e4
index 6dce89c..b3dbfb4 100644
ec62e4
--- a/setup.py
ec62e4
+++ b/setup.py
ec62e4
@@ -8,6 +8,8 @@ except ImportError:
ec62e4
     from distutils.command.install import install as _install
ec62e4
     from distutils.command.sdist import sdist as _sdist
ec62e4
 
ec62e4
+import ply
ec62e4
+
ec62e4
 
ec62e4
 def _run_build_tables(dir):
ec62e4
     from subprocess import check_call
ec62e4
@@ -60,7 +62,8 @@ setup(
ec62e4
         'Programming Language :: Python :: 3.6',
ec62e4
     ],
ec62e4
     python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
ec62e4
-    packages=['pycparser', 'pycparser.ply'],
ec62e4
+    packages=['pycparser'],
ec62e4
+    install_requires=['ply==' + ply.__version__],
ec62e4
     package_data={'pycparser': ['*.cfg']},
ec62e4
     cmdclass={'install': install, 'sdist': sdist},
ec62e4
 )