Blame SOURCES/pycparser-unbundle-ply.patch

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