Rev 5333: (gz) Make windows installer use a 2 second resolution for plugin script in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Sun Jul 4 11:55:14 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5333 [merge]
revision-id: pqm at pqm.ubuntu.com-20100704105513-pl97mf7hchthrush
parent: pqm at pqm.ubuntu.com-20100704093810-tqw6ncyt13z65q0m
parent: gzlist at googlemail.com-20100704070909-r51s2leny0wjcqtn
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sun 2010-07-04 11:55:13 +0100
message:
(gz) Make windows installer use a 2 second resolution for plugin script
timestamps to avoid recompilation at runtime (Martin [gz])
modified:
setup.py setup.py-20050314065409-02f8a0a6e3f9bc70
=== modified file 'setup.py'
--- a/setup.py 2010-06-22 04:15:25 +0000
+++ b/setup.py 2010-07-04 07:09:09 +0000
@@ -538,6 +538,14 @@
# time before living with docstring stripping
optimize = 1
compile_names = [f for f in self.outfiles if f.endswith('.py')]
+ # Round mtime to nearest even second so that installing on a FAT
+ # filesystem bytecode internal and script timestamps will match
+ for f in compile_names:
+ mtime = os.stat(f).st_mtime
+ remainder = mtime % 2
+ if remainder:
+ mtime -= remainder
+ os.utime(f, (mtime, mtime))
byte_compile(compile_names,
optimize=optimize,
force=self.force, prefix=self.install_dir,
More information about the bazaar-commits
mailing list