~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-10 02:12:40 UTC
  • mfrom: (4880.1.1 trivial)
  • Revision ID: pqm@pqm.ubuntu.com-20091210021240-dn85gd35waethxku
(mbp) mention GNU in --version

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',
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'])
295
299
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=[z_lib])
296
300
ext_modules.append(Extension('bzrlib._patiencediff_c',
297
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')
298
306
 
299
307
 
300
308
if unavailable_files:
327
335
    # Ensure tbzrlib itself is on sys.path
328
336
    sys.path.append(tbzr_root)
329
337
 
330
 
    # Ensure our COM "entry-point" is on sys.path
331
 
    sys.path.append(os.path.join(tbzr_root, "shellext", "python"))
332
 
 
333
338
    packages.append("tbzrlib")
334
339
 
335
340
    # collect up our icons.
357
362
    excludes.extend("""pywin pywin.dialogs pywin.dialogs.list
358
363
                       win32ui crawler.Crawler""".split())
359
364
 
360
 
    # NOTE: We still create a DLL version of the Python implemented shell
361
 
    # extension for testing purposes - but it is *not* registered by
362
 
    # default - our C++ one is instead.  To discourage people thinking
363
 
    # this DLL is still necessary, its called 'tbzr_old.dll'
364
 
    tbzr = dict(
365
 
        modules=["tbzr"],
366
 
        create_exe = False, # we only want a .dll
367
 
        dest_base = 'tbzr_old',
368
 
    )
369
 
    com_targets.append(tbzr)
370
 
 
371
365
    # tbzrcache executables - a "console" version for debugging and a
372
366
    # GUI version that is generally used.
373
367
    tbzrcache = dict(
398
392
    console_targets.append(tracer)
399
393
 
400
394
    # The C++ implemented shell extensions.
401
 
    dist_dir = os.path.join(tbzr_root, "shellext", "cpp", "tbzrshellext",
402
 
                            "build", "dist")
 
395
    dist_dir = os.path.join(tbzr_root, "shellext", "build")
403
396
    data_files.append(('', [os.path.join(dist_dir, 'tbzrshellext_x86.dll')]))
404
397
    data_files.append(('', [os.path.join(dist_dir, 'tbzrshellext_x64.dll')]))
405
398
 
636
629
                       'tools/win32/bzr_postinstall.py',
637
630
                       ]
638
631
    gui_targets = []
639
 
    com_targets = []
640
632
    data_files = topics_files + plugins_files
641
633
 
642
634
    if 'qbzr' in plugins:
687
679
    setup(options=options_list,
688
680
          console=console_targets,
689
681
          windows=gui_targets,
690
 
          com_server=com_targets,
691
682
          zipfile='lib/library.zip',
692
683
          data_files=data_files,
693
684
          cmdclass={'install_data': install_data_with_bytecompile},