~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Gary van der Merwe
  • Date: 2010-08-02 19:56:52 UTC
  • mfrom: (5050.3.18 2.2)
  • mto: (5050.3.19 2.2)
  • mto: This revision was merged to the branch mainline in revision 5371.
  • Revision ID: garyvdm@gmail.com-20100802195652-o1ppjemhwrr98i61
MergeĀ lp:bzr/2.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
699
699
                                        "tools/win32/py2exe_boot_common.py",
700
700
                              },
701
701
                   }
 
702
 
 
703
    # We want the libaray.zip to have optimize = 2, but the exe to have
 
704
    # optimize = 1, so that .py files that get compilied at run time
 
705
    # (e.g. user installed plugins) dont have their doc strings removed.
 
706
    class py2exe_no_oo_exe(py2exe.build_exe.py2exe):
 
707
        def build_executable(self, *args, **kwargs):
 
708
            self.optimize = 1
 
709
            py2exe.build_exe.py2exe.build_executable(self, *args, **kwargs)
 
710
            self.optimize = 2
 
711
 
702
712
    if __name__ == '__main__':
703
713
        setup(options=options_list,
704
714
              console=console_targets,
705
715
              windows=gui_targets,
706
716
              zipfile='lib/library.zip',
707
717
              data_files=data_files,
708
 
              cmdclass={'install_data': install_data_with_bytecompile},
 
718
              cmdclass={'install_data': install_data_with_bytecompile,
 
719
                        'py2exe': py2exe_no_oo_exe},
709
720
              )
710
721
 
711
722
else: