[tor-commits] [tor-browser-bundle/master] Reset mtimes on .py files before py2exe.

mikeperry at torproject.org mikeperry at torproject.org
Tue Jan 21 04:47:04 UTC 2014


commit dbe3d0bb310916577859ad3684bb41815349c940
Author: David Fifield <david at bamsoftware.com>
Date:   Sun Dec 1 21:04:35 2013 +0000

    Reset mtimes on .py files before py2exe.
    
    .pyc files contain the mtime of the .py file used to produce them. I
    couldn't find a way to prevent py2exe from byte-compiling .pyc files.
    
    http://benno.id.au/blog/2013/01/15/python-determinism
---
 gitian/descriptors/windows/gitian-pluggable-transports.yml |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gitian/descriptors/windows/gitian-pluggable-transports.yml b/gitian/descriptors/windows/gitian-pluggable-transports.yml
index ba4b22e..801a33d 100644
--- a/gitian/descriptors/windows/gitian-pluggable-transports.yml
+++ b/gitian/descriptors/windows/gitian-pluggable-transports.yml
@@ -136,6 +136,9 @@ script: |
   LD_PRELOAD= $INSTPYTHON setup.py install --single-version-externally-managed --record /dev/null
   cd ..
   #
+  # py2exe byte-compiles to .pyc files, which embed the mtime of the parent .py file.
+  find $INSTDIR/python -type f | xargs touch --date="$REFERENCE_DATETIME"
+  #
   cd obfsproxy
   find -type f | xargs touch --date="$REFERENCE_DATETIME"
   LD_PRELOAD= $INSTPYTHON setup_py2exe.py py2exe
@@ -158,6 +161,8 @@ script: |
   LD_PRELOAD= $INSTPYTHON setup.py install --single-version-externally-managed --record /dev/null
   cd ..
   #
+  find $INSTDIR/python -type f | xargs touch --date="$REFERENCE_DATETIME"
+  #
   cd flashproxy
   find -type f | xargs touch --date="$REFERENCE_DATETIME"
   make dist-exe DISTNAME=flashproxy-client PYTHON="LD_PRELOAD= $INSTPYTHON"





More information about the tor-commits mailing list