Blame SOURCES/pycparser-unbundle-ply.patch

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