/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: Canonical.com Patch Queue Manager
  • Date: 2010-01-14 00:01:32 UTC
  • mfrom: (4957.1.1 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100114000132-3p3rabnonjw3gzqb
(jam) Merge bzr.stable, bringing in bug fixes #175839, #504390

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
from distutils.extension import Extension
168
168
ext_modules = []
169
169
try:
170
 
    from Pyrex.Distutils import build_ext
 
170
    try:
 
171
        from Pyrex.Distutils import build_ext
 
172
        from Pyrex.Compiler.Version import version as pyrex_version
 
173
    except ImportError:
 
174
        print "No Pyrex, trying Cython..."
 
175
        from Cython.Distutils import build_ext
 
176
        from Cython.Compiler.Version import version as pyrex_version
171
177
except ImportError:
172
178
    have_pyrex = False
173
179
    # try to build the extension from the prior generated source.
180
186
    from distutils.command.build_ext import build_ext
181
187
else:
182
188
    have_pyrex = True
183
 
    from Pyrex.Compiler.Version import version as pyrex_version
184
189
 
185
190
 
186
191
class build_ext_if_possible(build_ext):
265
270
 
266
271
add_pyrex_extension('bzrlib._annotator_pyx')
267
272
add_pyrex_extension('bzrlib._bencode_pyx')
268
 
add_pyrex_extension('bzrlib._btree_serializer_pyx')
269
273
add_pyrex_extension('bzrlib._chunks_to_lines_pyx')
270
274
add_pyrex_extension('bzrlib._groupcompress_pyx',
271
275
                    extra_source=['bzrlib/diff-delta.c'])
278
282
    add_pyrex_extension('bzrlib._walkdirs_win32')
279
283
    z_lib = 'zdll'
280
284
else:
281
 
    if have_pyrex and pyrex_version == '0.9.4.1':
 
285
    if have_pyrex and pyrex_version.startswith('0.9.4'):
282
286
        # Pyrex 0.9.4.1 fails to compile this extension correctly
283
287
        # The code it generates re-uses a "local" pointer and
284
288
        # calls "PY_DECREF" after having set it to NULL. (It mixes PY_XDECREF
285
289
        # which is NULL safe with PY_DECREF which is not.)
 
290
        # <https://bugs.edge.launchpad.net/bzr/+bug/449372>
 
291
        # <https://bugs.edge.launchpad.net/bzr/+bug/276868>
286
292
        print 'Cannot build extension "bzrlib._dirstate_helpers_pyx" using'
287
293
        print 'your version of pyrex "%s". Please upgrade your pyrex' % (
288
294
            pyrex_version,)
295
301
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=[z_lib])
296
302
ext_modules.append(Extension('bzrlib._patiencediff_c',
297
303
                             ['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']))
 
307
add_pyrex_extension('bzrlib._btree_serializer_pyx')
298
308
 
299
309
 
300
310
if unavailable_files:
393
403
    # PyQt4 itself still escapes the plugin detection code for some reason...
394
404
    packages.append('PyQt4')
395
405
    excludes.append('PyQt4.elementtree.ElementTree')
 
406
    excludes.append('PyQt4.uic.port_v3')
396
407
    includes.append('sip') # extension module required for Qt.
397
408
    packages.append('pygments') # colorizer for qbzr
398
409
    packages.append('docutils') # html formatting