/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

  • Committer: Ian Clatworthy
  • Date: 2009-04-03 02:29:30 UTC
  • mto: This revision was merged to the branch mainline in revision 4259.
  • Revision ID: ian.clatworthy@canonical.com-20090403022930-epud0dn5421fp0a0
chk_map code from brisbane-core

Show diffs side-by-side

added added

removed removed

Lines of Context:
224
224
unavailable_files = []
225
225
 
226
226
 
227
 
def add_pyrex_extension(module_name, libraries=None):
 
227
def add_pyrex_extension(module_name, libraries=None, extra_source=[]):
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
 
        ext_modules.append(Extension(module_name, [pyrex_name],
251
 
            define_macros=define_macros, libraries=libraries))
 
250
        source = [pyrex_name]
252
251
    else:
253
252
        if not os.path.isfile(c_name):
254
253
            unavailable_files.append(c_name)
 
254
            return
255
255
        else:
256
 
            ext_modules.append(Extension(module_name, [c_name],
257
 
                define_macros=define_macros, libraries=libraries))
 
256
            source = [c_name]
 
257
    source.extend(extra_source)
 
258
    ext_modules.append(Extension(module_name, source,
 
259
        define_macros=define_macros, libraries=libraries))
258
260
 
259
261
 
260
262
add_pyrex_extension('bzrlib._btree_serializer_c')
261
263
add_pyrex_extension('bzrlib._chunks_to_lines_pyx')
262
264
add_pyrex_extension('bzrlib._knit_load_data_c')
 
265
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=['z'])
263
266
if sys.platform == 'win32':
264
267
    add_pyrex_extension('bzrlib._dirstate_helpers_c',
265
268
                        libraries=['Ws2_32'])