~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: John Arbash Meinel
  • Date: 2008-10-01 22:11:15 UTC
  • mto: This revision was merged to the branch mainline in revision 3762.
  • Revision ID: john@arbash-meinel.com-20081001221115-loptk3y40vt7e0uv
Work around bug #276868 by blacklisting pyrex 0.9.4.1 for that extension

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
    from distutils.command.build_ext import build_ext
176
176
else:
177
177
    have_pyrex = True
 
178
    from Pyrex.Compiler.Version import version as pyrex_version
 
179
    pyrex_version_info = tuple(map(int, pyrex_version.split('.')))
178
180
 
179
181
 
180
182
class build_ext_if_possible(build_ext):
237
239
    add_pyrex_extension('bzrlib._walkdirs_win32',
238
240
                        define_macros=[('WIN32', None)])
239
241
else:
240
 
    add_pyrex_extension('bzrlib._dirstate_helpers_c')
 
242
    if have_pyrex and pyrex_version_info < (0, 9, 6, 0):
 
243
        # Pyrex 0.9.4.1 fails to compile this extension correctly
 
244
        print 'Cannot build extension "bzrlib._dirstate_helpers_c" using'
 
245
        print 'your version of pyrex "%s". Please upgrade to a version' % (
 
246
            pyrex_version,)
 
247
        print '>= 0.9.6. For now, the non-compiled (python) version will'
 
248
        print 'be used instead.'
 
249
    else:
 
250
        add_pyrex_extension('bzrlib._dirstate_helpers_c')
241
251
    add_pyrex_extension('bzrlib._readdir_pyx')
242
252
ext_modules.append(Extension('bzrlib._patiencediff_c', ['bzrlib/_patiencediff_c.c']))
243
253