Skip to content
Myr

Added filesize part to the module compiler. This fixes #131 for 3.3 and later

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 6327f79 · Browse files · 1 file+4 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−0 removed

  • other:+4 added−0 removed

1 file+4 added−0 removed

modified:jinja2/environment.py+4 added
568 unmodified lines
569 import imp, marshal570 py_header = imp.get_magic() + \571 u'\xff\xff\xff\xff'.encode('iso-8859-15')572573 # Python 3.3 added a source filesize to the header574 if sys.version_info >= (3, 3):575 py_header += '\x00\x00\x00\x00'576577 def write_file(filename, data, mode):578 if zip:579 info = ZipInfo(filename)580 info.external_attr = 0755 << 16L
545 unmodified lines