[Python-modules-commits] r17278 - in packages/ply/trunk/debian (4 files)
eriol-guest at users.alioth.debian.org
eriol-guest at users.alioth.debian.org
Fri Jun 3 18:34:49 UTC 2011
Date: Friday, June 3, 2011 @ 18:34:48
Author: eriol-guest
Revision: 17278
Added patches to fix wrong ply.lex tabversion
Added:
packages/ply/trunk/debian/patches/
packages/ply/trunk/debian/patches/01_fix-lex-tabversion.patch
packages/ply/trunk/debian/patches/02_relax-lex-tabversion-check.patch
packages/ply/trunk/debian/patches/series
Added: packages/ply/trunk/debian/patches/01_fix-lex-tabversion.patch
===================================================================
--- packages/ply/trunk/debian/patches/01_fix-lex-tabversion.patch (rev 0)
+++ packages/ply/trunk/debian/patches/01_fix-lex-tabversion.patch 2011-06-03 18:34:48 UTC (rev 17278)
@@ -0,0 +1,23 @@
+Description: Set proper _tabversion in ply.lex
+Author: Daniele Tricoli <eriol at mornie.org>
+Forwarded: https://github.com/dabeaz/ply/pull/1
+--- a/ply/lex.py
++++ b/ply/lex.py
+@@ -175,7 +175,7 @@
+ filename = os.path.join(outputdir,basetabfilename)+".py"
+ tf = open(filename,"w")
+ tf.write("# %s.py. This file automatically created by PLY (version %s). Don't edit!\n" % (tabfile,__version__))
+- tf.write("_tabversion = %s\n" % repr(__version__))
++ tf.write("_tabversion = %s\n" % repr(__tabversion__))
+ tf.write("_lextokens = %s\n" % repr(self.lextokens))
+ tf.write("_lexreflags = %s\n" % repr(self.lexreflags))
+ tf.write("_lexliterals = %s\n" % repr(self.lexliterals))
+@@ -222,7 +222,7 @@
+ exec("import %s as lextab" % tabfile, env,env)
+ lextab = env['lextab']
+
+- if getattr(lextab,"_tabversion","0.0") != __version__:
++ if getattr(lextab,"_tabversion","0.0") != __tabversion__:
+ raise ImportError("Inconsistent PLY version")
+
+ self.lextokens = lextab._lextokens
Added: packages/ply/trunk/debian/patches/02_relax-lex-tabversion-check.patch
===================================================================
--- packages/ply/trunk/debian/patches/02_relax-lex-tabversion-check.patch (rev 0)
+++ packages/ply/trunk/debian/patches/02_relax-lex-tabversion-check.patch 2011-06-03 18:34:48 UTC (rev 17278)
@@ -0,0 +1,18 @@
+Description: Don't break already built packages with wrong _tabversion
+Author: Daniele Tricoli <eriol at mornie.org>
+Forwarded: not-needed
+--- a/ply/lex.py
++++ b/ply/lex.py
+@@ -222,6 +222,12 @@
+ exec("import %s as lextab" % tabfile, env,env)
+ lextab = env['lextab']
+
++ # python-ply 3.3-1 is shipped by Debian since Squeeze, so
++ # to not brake packages that were built with wrong
++ # _tabversion we need to explicitly fix it.
++ if __version__ in ('3.3', '3.4'):
++ setattr(lextab, '_tabversion', '3.2')
++
+ if getattr(lextab,"_tabversion","0.0") != __tabversion__:
+ raise ImportError("Inconsistent PLY version")
+
Added: packages/ply/trunk/debian/patches/series
===================================================================
--- packages/ply/trunk/debian/patches/series (rev 0)
+++ packages/ply/trunk/debian/patches/series 2011-06-03 18:34:48 UTC (rev 17278)
@@ -0,0 +1,2 @@
+01_fix-lex-tabversion.patch
+02_relax-lex-tabversion-check.patch
More information about the Python-modules-commits
mailing list