~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-06 06:48:25 UTC
  • mfrom: (4070.8.6 debug-config)
  • Revision ID: pqm@pqm.ubuntu.com-20090306064825-kbpwggw21dygeix6
(mbp) debug_flags configuration option

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
            build_ext.build_extension(self, ext)
210
210
        except CCompilerError:
211
211
            if not self.allow_python_fallback:
212
 
                log.warn('\n  Cannot build extension "%s".\n'
 
212
                log.warn('\n  Cannot build extensions.\n'
213
213
                         '  Use "build_ext --allow-python-fallback" to use'
214
214
                         ' slower python implementations instead.\n'
215
215
                         % (ext.name,))
224
224
unavailable_files = []
225
225
 
226
226
 
227
 
def add_pyrex_extension(module_name, libraries=None, extra_source=[]):
 
227
def add_pyrex_extension(module_name, libraries=None):
228
228
    """Add a pyrex module to build.
229
229
 
230
230
    This will use Pyrex to auto-generate the .c file if it is available.
247
247
        # right value.
248
248
        define_macros.append(('WIN32', None))
249
249
    if have_pyrex:
250
 
        source = [pyrex_name]
 
250
        ext_modules.append(Extension(module_name, [pyrex_name],
 
251
            define_macros=define_macros, libraries=libraries))
251
252
    else:
252
253
        if not os.path.isfile(c_name):
253
254
            unavailable_files.append(c_name)
254
 
            return
255
255
        else:
256
 
            source = [c_name]
257
 
    source.extend(extra_source)
258
 
    ext_modules.append(Extension(module_name, source,
259
 
        define_macros=define_macros, libraries=libraries))
 
256
            ext_modules.append(Extension(module_name, [c_name],
 
257
                define_macros=define_macros, libraries=libraries))
260
258
 
261
259
 
262
260
add_pyrex_extension('bzrlib._btree_serializer_c')
263
 
add_pyrex_extension('bzrlib._groupcompress_pyx',
264
 
                    extra_source=['bzrlib/diff-delta.c'])
265
261
add_pyrex_extension('bzrlib._chunks_to_lines_pyx')
266
262
add_pyrex_extension('bzrlib._knit_load_data_c')
267
 
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=['z'])
268
263
if sys.platform == 'win32':
269
264
    add_pyrex_extension('bzrlib._dirstate_helpers_c',
270
265
                        libraries=['Ws2_32'])