~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
########################
149
149
 
150
150
command_classes = {'install_scripts': my_install_scripts,
151
 
                  'build': bzr_build}
 
151
                   'build': bzr_build}
152
152
ext_modules = []
153
153
try:
154
154
    from Pyrex.Distutils import build_ext
160
160
    from distutils.extension import Extension
161
161
    #ext_modules.append(
162
162
    #    Extension("bzrlib.modulename", ["bzrlib/foo.c"], libraries = []))
 
163
    ext_modules.append(
 
164
        Extension("bzrlib._knit_load_data_c", ["bzrlib/_knit_load_data_c.c"]))
163
165
else:
164
166
    from distutils.extension import Extension
165
167
    #ext_modules.append(
166
168
    #    Extension("bzrlib.modulename", ["bzrlib/foo.pyx"], libraries = []))
 
169
    ext_modules.append(
 
170
        Extension("bzrlib._knit_load_data_c", ["bzrlib/_knit_load_data_c.pyx"]))
167
171
command_classes['build_ext'] = build_ext
168
172
 
169
173
if 'bdist_wininst' in sys.argv:
173
177
    dev_docs = glob.glob('doc/developers/*.htm')
174
178
    # python's distutils-based win32 installer
175
179
    ARGS = {'scripts': ['bzr', 'tools/win32/bzr-win32-bdist-postinstall.py'],
 
180
            'ext_modules': ext_modules,
176
181
            # help pages
177
182
            'data_files': [('Doc/Bazaar', docs),
178
183
                           ('Doc/Bazaar/developers', dev_docs),
179
184
                          ],
 
185
            # for building pyrex extensions
 
186
            'cmdclass': {'build_ext': build_ext},
180
187
           }
181
188
 
182
189
    ARGS.update(META_INFO)
223
230
        import warnings
224
231
        warnings.warn('Unknown Python version.\n'
225
232
                      'Please check setup.py script for compatibility.')
 
233
    # email package from std python library use lazy import,
 
234
    # so we need to explicitly add all package
 
235
    additional_packages.append('email')
226
236
 
227
237
    options_list = {"py2exe": {"packages": BZRLIB['packages'] +
228
238
                                           additional_packages,