/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Vincent Ladeuil
  • Date: 2010-01-25 17:48:22 UTC
  • mto: (4987.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4988.
  • Revision ID: v.ladeuil+lp@free.fr-20100125174822-nce4l19sbwx83jvq
Deploying the new overrideAttr facility further reduces the complexity
and make the code clearer.

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://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',
186
186
    from distutils.command.build_ext import build_ext
187
187
else:
188
188
    have_pyrex = True
189
 
    pyrex_version_info = tuple(map(int, pyrex_version.split('.')))
190
189
 
191
190
 
192
191
class build_ext_if_possible(build_ext):
281
280
    add_pyrex_extension('bzrlib._dirstate_helpers_pyx',
282
281
                        libraries=['Ws2_32'])
283
282
    add_pyrex_extension('bzrlib._walkdirs_win32')
 
283
    z_lib = 'zdll'
284
284
else:
285
 
    if have_pyrex and pyrex_version_info[:3] == (0,9,4):
 
285
    if have_pyrex and pyrex_version.startswith('0.9.4'):
286
286
        # Pyrex 0.9.4.1 fails to compile this extension correctly
287
287
        # The code it generates re-uses a "local" pointer and
288
288
        # calls "PY_DECREF" after having set it to NULL. (It mixes PY_XDECREF
297
297
    else:
298
298
        add_pyrex_extension('bzrlib._dirstate_helpers_pyx')
299
299
    add_pyrex_extension('bzrlib._readdir_pyx')
300
 
add_pyrex_extension('bzrlib._chk_map_pyx')
 
300
    z_lib = 'z'
 
301
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=[z_lib])
301
302
ext_modules.append(Extension('bzrlib._patiencediff_c',
302
303
                             ['bzrlib/_patiencediff_c.c']))
303
 
if have_pyrex and pyrex_version_info < (0, 9, 6, 3):
304
 
    print
305
 
    print 'Your Pyrex/Cython version %s is too old to build the simple_set' % (
306
 
        pyrex_version)
307
 
    print 'and static_tuple extensions.'
308
 
    print 'Please upgrade to at least Pyrex 0.9.6.3'
309
 
    print
310
 
    # TODO: Should this be a fatal error?
311
 
else:
312
 
    # We only need 0.9.6.3 to build _simple_set_pyx, but static_tuple depends
313
 
    # on simple_set
314
 
    add_pyrex_extension('bzrlib._simple_set_pyx')
315
 
    ext_modules.append(Extension('bzrlib._static_tuple_c',
316
 
                                 ['bzrlib/_static_tuple_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']))
317
307
add_pyrex_extension('bzrlib._btree_serializer_pyx')
318
308
 
319
309
 
468
458
 
469
459
def get_svn_py2exe_info(includes, excludes, packages):
470
460
    packages.append('subvertpy')
471
 
    packages.append('sqlite3')
472
461
 
473
462
 
474
463
if 'bdist_wininst' in sys.argv:
552
541
                                     version = version_str,
553
542
                                     description = META_INFO['description'],
554
543
                                     author = META_INFO['author'],
555
 
                                     copyright = "(c) Canonical Ltd, 2005-2010",
 
544
                                     copyright = "(c) Canonical Ltd, 2005-2009",
556
545
                                     company_name = "Canonical Ltd.",
557
546
                                     comments = META_INFO['description'],
558
547
                                    )
571
560
    if sys.version.startswith('2.4'):
572
561
        # adding elementtree package
573
562
        additional_packages.add('elementtree')
574
 
    elif sys.version.startswith('2.6') or sys.version.startswith('2.5'):
 
563
    elif sys.version.startswith('2.5'):
575
564
        additional_packages.add('xml.etree')
576
565
    else:
577
566
        import warnings
623
612
            excludes.extend(["bzrlib.plugins." + d for d in dirs])
624
613
        x = []
625
614
        for i in files:
626
 
            # Throw away files we don't want packaged. Note that plugins may
627
 
            # have data files with all sorts of extensions so we need to
628
 
            # be conservative here about what we ditch.
629
 
            ext = os.path.splitext(i)[1]
630
 
            if ext.endswith('~') or ext in [".pyc", ".swp"]:
 
615
            if os.path.splitext(i)[1] not in [".py", ".pyd", ".dll", ".mo"]:
631
616
                continue
632
617
            if i == '__init__.py' and root == 'bzrlib/plugins':
633
618
                continue
710
695
        # easy_install one
711
696
        DATA_FILES = [('man/man1', ['bzr.1'])]
712
697
 
713
 
    if sys.platform != 'win32':
714
 
        # see https://wiki.kubuntu.org/Apport/DeveloperHowTo
715
 
        #
716
 
        # checking the paths and hardcoding the check for root is a bit gross,
717
 
        # but I don't see a cleaner way to find out the locations in a way
718
 
        # that's going to align with the hardcoded paths in apport.
719
 
        if os.geteuid() == 0:
720
 
            DATA_FILES += [
721
 
                ('/usr/share/apport/package-hooks',
722
 
                    ['apport/source_bzr.py']),
723
 
                ('/etc/apport/crashdb.conf.d/',
724
 
                    ['apport/bzr-crashdb.conf']),]
725
 
 
726
698
    # std setup
727
699
    ARGS = {'scripts': ['bzr'],
728
700
            'data_files': DATA_FILES,