~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Joe Julian
  • Date: 2010-01-10 02:25:31 UTC
  • mto: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: joe@julianfamily.org-20100110022531-wqk61rsagz8xsiga
Added MANIFEST.in to allow bdist_rpm to have all the required include files and tools. bdist_rpm will still fail to build correctly on some distributions due to a disttools bug http://bugs.python.org/issue644744

Show diffs side-by-side

added added

removed removed

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