~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

(gz) Make windows installer use a 2 second resolution for plugin script
 timestamps to avoid recompilation at runtime (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
538
538
            #                time before living with docstring stripping
539
539
            optimize = 1
540
540
            compile_names = [f for f in self.outfiles if f.endswith('.py')]
 
541
            # Round mtime to nearest even second so that installing on a FAT
 
542
            # filesystem bytecode internal and script timestamps will match
 
543
            for f in compile_names:
 
544
                mtime = os.stat(f).st_mtime
 
545
                remainder = mtime % 2
 
546
                if remainder:
 
547
                    mtime -= remainder
 
548
                    os.utime(f, (mtime, mtime))
541
549
            byte_compile(compile_names,
542
550
                         optimize=optimize,
543
551
                         force=self.force, prefix=self.install_dir,