~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Martin
  • Date: 2009-11-07 08:02:13 UTC
  • mfrom: (4789 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4809.
  • Revision ID: gzlist@googlemail.com-20091107080213-jad185091b3l69ih
Merge bzr.dev 4789 to resolve conflict from the disabling of plink auto-detection, and relocate NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    'url':          'http://www.bazaar-vcs.org/',
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'])
292
299
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=[z_lib])
293
300
ext_modules.append(Extension('bzrlib._patiencediff_c',
294
301
                             ['bzrlib/_patiencediff_c.c']))
 
302
add_pyrex_extension('bzrlib._simple_set_pyx')
 
303
ext_modules.append(Extension('bzrlib._static_tuple_c',
 
304
                             ['bzrlib/_static_tuple_c.c']))
 
305
add_pyrex_extension('bzrlib._btree_serializer_pyx')
295
306
 
296
307
 
297
308
if unavailable_files:
324
335
    # Ensure tbzrlib itself is on sys.path
325
336
    sys.path.append(tbzr_root)
326
337
 
327
 
    # Ensure our COM "entry-point" is on sys.path
328
 
    sys.path.append(os.path.join(tbzr_root, "shellext", "python"))
329
 
 
330
338
    packages.append("tbzrlib")
331
339
 
332
340
    # collect up our icons.
354
362
    excludes.extend("""pywin pywin.dialogs pywin.dialogs.list
355
363
                       win32ui crawler.Crawler""".split())
356
364
 
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
365
    # tbzrcache executables - a "console" version for debugging and a
369
366
    # GUI version that is generally used.
370
367
    tbzrcache = dict(
395
392
    console_targets.append(tracer)
396
393
 
397
394
    # The C++ implemented shell extensions.
398
 
    dist_dir = os.path.join(tbzr_root, "shellext", "cpp", "tbzrshellext",
399
 
                            "build", "dist")
 
395
    dist_dir = os.path.join(tbzr_root, "shellext", "build")
400
396
    data_files.append(('', [os.path.join(dist_dir, 'tbzrshellext_x86.dll')]))
401
397
    data_files.append(('', [os.path.join(dist_dir, 'tbzrshellext_x64.dll')]))
402
398
 
408
404
    includes.append('sip') # extension module required for Qt.
409
405
    packages.append('pygments') # colorizer for qbzr
410
406
    packages.append('docutils') # html formatting
 
407
    includes.append('win32event')  # for qsubprocess stuff
411
408
    # but we can avoid many Qt4 Dlls.
412
409
    dll_excludes.extend(
413
410
        """QtAssistantClient4.dll QtCLucene4.dll QtDesigner4.dll
541
538
                                     version = version_str,
542
539
                                     description = META_INFO['description'],
543
540
                                     author = META_INFO['author'],
544
 
                                     copyright = "(c) Canonical Ltd, 2005-2007",
 
541
                                     copyright = "(c) Canonical Ltd, 2005-2009",
545
542
                                     company_name = "Canonical Ltd.",
546
543
                                     comments = META_INFO['description'],
547
544
                                    )
632
629
                       'tools/win32/bzr_postinstall.py',
633
630
                       ]
634
631
    gui_targets = []
635
 
    com_targets = []
636
632
    data_files = topics_files + plugins_files
637
633
 
638
634
    if 'qbzr' in plugins:
683
679
    setup(options=options_list,
684
680
          console=console_targets,
685
681
          windows=gui_targets,
686
 
          com_server=com_targets,
687
682
          zipfile='lib/library.zip',
688
683
          data_files=data_files,
689
684
          cmdclass={'install_data': install_data_with_bytecompile},