~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 16:54:55 UTC
  • mto: (4797.2.26 2.1)
  • mto: This revision was merged to the branch mainline in revision 5075.
  • Revision ID: john@arbash-meinel.com-20100217165455-g4v9swlc4eyyr4sq
Require pyrex 0.9.6.3 as the minimum version to build the static_tuple extensions.

bug #449776

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
    from distutils.command.build_ext import build_ext
187
187
else:
188
188
    have_pyrex = True
 
189
    pyrex_version_info = map(int, pyrex_version.split('.'))
189
190
 
190
191
 
191
192
class build_ext_if_possible(build_ext):
282
283
    add_pyrex_extension('bzrlib._walkdirs_win32')
283
284
    z_lib = 'zdll'
284
285
else:
285
 
    if have_pyrex and pyrex_version.startswith('0.9.4'):
 
286
    if have_pyrex and pyrex_version_info[:3] == (0,9,4):
286
287
        # Pyrex 0.9.4.1 fails to compile this extension correctly
287
288
        # The code it generates re-uses a "local" pointer and
288
289
        # calls "PY_DECREF" after having set it to NULL. (It mixes PY_XDECREF
301
302
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=[z_lib])
302
303
ext_modules.append(Extension('bzrlib._patiencediff_c',
303
304
                             ['bzrlib/_patiencediff_c.c']))
304
 
add_pyrex_extension('bzrlib._simple_set_pyx')
305
 
ext_modules.append(Extension('bzrlib._static_tuple_c',
306
 
                             ['bzrlib/_static_tuple_c.c']))
 
305
if have_pyrex and pyrex_version_info < (0, 9, 6, 3):
 
306
    print
 
307
    print 'Your Pyrex/Cython version %s is too old to build the simple_set' % (
 
308
        pyrex_version)
 
309
    print 'and static_tuple extensions.'
 
310
    print 'Please upgrade to at least Pyrex 0.9.6.3'
 
311
    print
 
312
    # TODO: Should this be a fatal error?
 
313
else:
 
314
    # We only need 0.9.6.3 to build _simple_set_pyx, but static_tuple depends
 
315
    # on simple_set
 
316
    add_pyrex_extension('bzrlib._simple_set_pyx')
 
317
    ext_modules.append(Extension('bzrlib._static_tuple_c',
 
318
                                 ['bzrlib/_static_tuple_c.c']))
307
319
add_pyrex_extension('bzrlib._btree_serializer_pyx')
308
320
 
309
321