Blame SOURCES/jinja2-add-source-filesize-to-header.patch

3d161c
commit 9e9cf47c81dc3ecae451b4224168ca6bab2cf701
3d161c
Author: Armin Ronacher <armin.ronacher@active-4.com>
3d161c
Date:   Sun Sep 16 08:26:31 2012 +0900
3d161c
3d161c
    Added filesize part to the module compiler.  This fixes #131 for 3.3 and later
3d161c
3d161c
diff --git a/jinja2/environment.py b/jinja2/environment.py
3d161c
index ebb5454..130f9a1 100644
3d161c
--- a/jinja2/environment.py
3d161c
+++ b/jinja2/environment.py
3d161c
@@ -570,6 +570,10 @@ class Environment(object):
3d161c
             py_header = imp.get_magic() + \
3d161c
                 u'\xff\xff\xff\xff'.encode('iso-8859-15')
3d161c
 
3d161c
+            # Python 3.3 added a source filesize to the header
3d161c
+            if sys.version_info >= (3, 3):
3d161c
+                py_header += '\x00\x00\x00\x00'
3d161c
+
3d161c
         def write_file(filename, data, mode):
3d161c
             if zip:
3d161c
                 info = ZipInfo(filename)