~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

MergeĀ lp:bzr.

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):
295
300
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=[z_lib])
296
301
ext_modules.append(Extension('bzrlib._patiencediff_c',
297
302
                             ['bzrlib/_patiencediff_c.c']))
298
 
 
 
303
add_pyrex_extension('bzrlib._simple_set_pyx')
 
304
ext_modules.append(Extension('bzrlib._static_tuple_c',
 
305
                             ['bzrlib/_static_tuple_c.c']))
299
306
 
300
307
if unavailable_files:
301
308
    print 'C extension(s) not found:'