~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-09 17:27:46 UTC
  • mto: (5029.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5030.
  • Revision ID: v.ladeuil+lp@free.fr-20100209172746-6f4mvlnr2mac807j
Move NoSmartTransportServer to bzrlib.tests.test_server

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-vcs.org/',
 
40
    'url':          'http://www.bazaar.canonical.com/',
41
41
    'description':  'Friendly distributed version control system',
42
42
    'license':      'GNU GPL v2',
43
 
    'download_url': 'http://bazaar-vcs.org/Download',
 
43
    'download_url': 'https://launchpad.net/bzr/+download',
44
44
    'long_description': get_long_description(),
45
45
    'classifiers': [
46
46
        'Development Status :: 6 - Mature',
65
65
            'package_data': {'bzrlib': ['doc/api/*.txt',
66
66
                                        'tests/test_patches_data/*',
67
67
                                        'help_topics/en/*.txt',
 
68
                                        'tests/ssl_certs/server_without_pass.key',
 
69
                                        'tests/ssl_certs/server_with_pass.key',
 
70
                                        'tests/ssl_certs/server.crt'
68
71
                                       ]},
69
72
           }
70
73
 
164
167
from distutils.extension import Extension
165
168
ext_modules = []
166
169
try:
167
 
    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
168
177
except ImportError:
169
178
    have_pyrex = False
170
179
    # try to build the extension from the prior generated source.
177
186
    from distutils.command.build_ext import build_ext
178
187
else:
179
188
    have_pyrex = True
180
 
    from Pyrex.Compiler.Version import version as pyrex_version
181
189
 
182
190
 
183
191
class build_ext_if_possible(build_ext):
262
270
 
263
271
add_pyrex_extension('bzrlib._annotator_pyx')
264
272
add_pyrex_extension('bzrlib._bencode_pyx')
265
 
add_pyrex_extension('bzrlib._btree_serializer_pyx')
266
273
add_pyrex_extension('bzrlib._chunks_to_lines_pyx')
267
274
add_pyrex_extension('bzrlib._groupcompress_pyx',
268
275
                    extra_source=['bzrlib/diff-delta.c'])
275
282
    add_pyrex_extension('bzrlib._walkdirs_win32')
276
283
    z_lib = 'zdll'
277
284
else:
278
 
    if have_pyrex and pyrex_version == '0.9.4.1':
 
285
    if have_pyrex and pyrex_version.startswith('0.9.4'):
279
286
        # Pyrex 0.9.4.1 fails to compile this extension correctly
280
287
        # The code it generates re-uses a "local" pointer and
281
288
        # calls "PY_DECREF" after having set it to NULL. (It mixes PY_XDECREF
282
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>
283
292
        print 'Cannot build extension "bzrlib._dirstate_helpers_pyx" using'
284
293
        print 'your version of pyrex "%s". Please upgrade your pyrex' % (
285
294
            pyrex_version,)
292
301
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=[z_lib])
293
302
ext_modules.append(Extension('bzrlib._patiencediff_c',
294
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')
295
308
 
296
309
 
297
310
if unavailable_files:
324
337
    # Ensure tbzrlib itself is on sys.path
325
338
    sys.path.append(tbzr_root)
326
339
 
327
 
    # Ensure our COM "entry-point" is on sys.path
328
 
    sys.path.append(os.path.join(tbzr_root, "shellext", "python"))
329
 
 
330
340
    packages.append("tbzrlib")
331
341
 
332
342
    # collect up our icons.
354
364
    excludes.extend("""pywin pywin.dialogs pywin.dialogs.list
355
365
                       win32ui crawler.Crawler""".split())
356
366
 
357
 
    # NOTE: We still create a DLL version of the Python implemented shell
358
 
    # extension for testing purposes - but it is *not* registered by
359
 
    # default - our C++ one is instead.  To discourage people thinking
360
 
    # this DLL is still necessary, its called 'tbzr_old.dll'
361
 
    tbzr = dict(
362
 
        modules=["tbzr"],
363
 
        create_exe = False, # we only want a .dll
364
 
        dest_base = 'tbzr_old',
365
 
    )
366
 
    com_targets.append(tbzr)
367
 
 
368
367
    # tbzrcache executables - a "console" version for debugging and a
369
368
    # GUI version that is generally used.
370
369
    tbzrcache = dict(
395
394
    console_targets.append(tracer)
396
395
 
397
396
    # The C++ implemented shell extensions.
398
 
    dist_dir = os.path.join(tbzr_root, "shellext", "cpp", "tbzrshellext",
399
 
                            "build", "dist")
 
397
    dist_dir = os.path.join(tbzr_root, "shellext", "build")
400
398
    data_files.append(('', [os.path.join(dist_dir, 'tbzrshellext_x86.dll')]))
401
399
    data_files.append(('', [os.path.join(dist_dir, 'tbzrshellext_x64.dll')]))
402
400
 
405
403
    # PyQt4 itself still escapes the plugin detection code for some reason...
406
404
    packages.append('PyQt4')
407
405
    excludes.append('PyQt4.elementtree.ElementTree')
 
406
    excludes.append('PyQt4.uic.port_v3')
408
407
    includes.append('sip') # extension module required for Qt.
409
408
    packages.append('pygments') # colorizer for qbzr
410
409
    packages.append('docutils') # html formatting
 
410
    includes.append('win32event')  # for qsubprocess stuff
411
411
    # but we can avoid many Qt4 Dlls.
412
412
    dll_excludes.extend(
413
413
        """QtAssistantClient4.dll QtCLucene4.dll QtDesigner4.dll
541
541
                                     version = version_str,
542
542
                                     description = META_INFO['description'],
543
543
                                     author = META_INFO['author'],
544
 
                                     copyright = "(c) Canonical Ltd, 2005-2007",
 
544
                                     copyright = "(c) Canonical Ltd, 2005-2009",
545
545
                                     company_name = "Canonical Ltd.",
546
546
                                     comments = META_INFO['description'],
547
547
                                    )
632
632
                       'tools/win32/bzr_postinstall.py',
633
633
                       ]
634
634
    gui_targets = []
635
 
    com_targets = []
636
635
    data_files = topics_files + plugins_files
637
636
 
638
637
    if 'qbzr' in plugins:
683
682
    setup(options=options_list,
684
683
          console=console_targets,
685
684
          windows=gui_targets,
686
 
          com_server=com_targets,
687
685
          zipfile='lib/library.zip',
688
686
          data_files=data_files,
689
687
          cmdclass={'install_data': install_data_with_bytecompile},