/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to setup.py

merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
                                        'tests/ssl_certs/ca.crt',
70
70
                                        'tests/ssl_certs/server_without_pass.key',
71
71
                                        'tests/ssl_certs/server_with_pass.key',
72
 
                                        'tests/ssl_certs/server.crt'
 
72
                                        'tests/ssl_certs/server.crt',
 
73
                                        'locale/*/LC_MESSAGES/*.mo',
73
74
                                       ]},
74
75
           }
75
76
 
152
153
    Generate bzr.1.
153
154
    """
154
155
 
 
156
    sub_commands = build.sub_commands + [
 
157
            ('build_mo', lambda _: True),
 
158
            ]
 
159
 
155
160
    def run(self):
156
161
        build.run(self)
157
162
 
163
168
## Setup
164
169
########################
165
170
 
 
171
from tools.build_mo import build_mo
 
172
 
166
173
command_classes = {'install_scripts': my_install_scripts,
167
 
                   'build': bzr_build}
 
174
                   'build': bzr_build,
 
175
                   'build_mo': build_mo,
 
176
                   }
168
177
from distutils import log
169
178
from distutils.errors import CCompilerError, DistutilsPlatformError
170
179
from distutils.extension import Extension
493
502
            # help pages
494
503
            'data_files': find_docs(),
495
504
            # for building pyrex extensions
496
 
            'cmdclass': {'build_ext': build_ext_if_possible},
 
505
            'cmdclass': command_classes,
497
506
           }
498
507
 
499
508
    ARGS.update(META_INFO)
500
509
    ARGS.update(BZRLIB)
501
510
    ARGS.update(PKG_DATA)
502
 
    
 
511
 
503
512
    setup(**ARGS)
504
513
 
505
514
elif 'py2exe' in sys.argv:
716
725
            self.optimize = 2
717
726
 
718
727
    if __name__ == '__main__':
 
728
        command_classes['install_data'] = install_data_with_bytecompile
 
729
        command_classes['py2exe'] = py2exe_no_oo_exe
719
730
        setup(options=options_list,
720
731
              console=console_targets,
721
732
              windows=gui_targets,
722
733
              zipfile='lib/library.zip',
723
734
              data_files=data_files,
724
 
              cmdclass={'install_data': install_data_with_bytecompile,
725
 
                        'py2exe': py2exe_no_oo_exe},
 
735
              cmdclass=command_classes,
726
736
              )
727
737
 
728
738
else: