~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Gary van der Merwe
  • Author(s): Martin
  • Date: 2010-07-23 16:50:36 UTC
  • mto: (5050.3.17 2.2)
  • mto: This revision was merged to the branch mainline in revision 5361.
  • Revision ID: garyvdm@gmail.com-20100723165036-k3t4swda5z6ezpc4
Hack py2exe so that we can have a library.zip built with optimize=2, but every thing else has optimize=1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
694
694
                               "optimize": 2,
695
695
                              },
696
696
                   }
 
697
 
 
698
    class py2exe_no_oo_exe(py2exe.build_exe.py2exe):
 
699
        def build_executable(*args, **kwargs):
 
700
            self.optimize = 1
 
701
            super(py2exe_no_oo_exe, self).build_executable(*args, **kwargs)
 
702
            self.optimize = 2
 
703
 
697
704
    if __name__ == '__main__':
698
705
        setup(options=options_list,
699
706
              console=console_targets,
700
707
              windows=gui_targets,
701
708
              zipfile='lib/library.zip',
702
709
              data_files=data_files,
703
 
              cmdclass={'install_data': install_data_with_bytecompile},
 
710
              cmdclass={'install_data': install_data_with_bytecompile,
 
711
                        'py2exe': py2exe_no_oo_exe},
704
712
              )
705
713
 
706
714
else: