Blame SOURCES/pycparser-unbundle-ply.patch

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