~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Martin
  • Date: 2010-07-03 21:40:07 UTC
  • mto: This revision was merged to the branch mainline in revision 5333.
  • Revision ID: gzlist@googlemail.com-20100703214007-hfdnd7ylpc3ycsea
For windows installer plugin script files, round mtime to make happy FAT

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
                if mtime % 2:
 
546
                    mtime += 1
 
547
                    os.utime(f, (mtime, mtime))
541
548
            byte_compile(compile_names,
542
549
                         optimize=optimize,
543
550
                         force=self.force, prefix=self.install_dir,