/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: Gordon Tyler
  • Date: 2010-01-14 15:24:04 UTC
  • mto: (5037.3.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5046.
  • Revision ID: gordon@doxxx.net-20100114152404-d64ik2afl96lcml0
Reverted changes to test_rules since the original should work now.

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 == '0.9.4.1':
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
289
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>
292
290
        print 'Cannot build extension "bzrlib._dirstate_helpers_pyx" using'
293
291
        print 'your version of pyrex "%s". Please upgrade your pyrex' % (
294
292
            pyrex_version,)
297
295
    else:
298
296
        add_pyrex_extension('bzrlib._dirstate_helpers_pyx')
299
297
    add_pyrex_extension('bzrlib._readdir_pyx')
300
 
add_pyrex_extension('bzrlib._chk_map_pyx')
 
298
    z_lib = 'z'
 
299
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=[z_lib])
301
300
ext_modules.append(Extension('bzrlib._patiencediff_c',
302
301
                             ['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']))
 
302
add_pyrex_extension('bzrlib._simple_set_pyx')
 
303
ext_modules.append(Extension('bzrlib._static_tuple_c',
 
304
                             ['bzrlib/_static_tuple_c.c']))
317
305
add_pyrex_extension('bzrlib._btree_serializer_pyx')
318
306
 
319
307
 
413
401
    # PyQt4 itself still escapes the plugin detection code for some reason...
414
402
    packages.append('PyQt4')
415
403
    excludes.append('PyQt4.elementtree.ElementTree')
416
 
    excludes.append('PyQt4.uic.port_v3')
417
404
    includes.append('sip') # extension module required for Qt.
418
405
    packages.append('pygments') # colorizer for qbzr
419
406
    packages.append('docutils') # html formatting
468
455
 
469
456
def get_svn_py2exe_info(includes, excludes, packages):
470
457
    packages.append('subvertpy')
471
 
    packages.append('sqlite3')
472
458
 
473
459
 
474
460
if 'bdist_wininst' in sys.argv:
552
538
                                     version = version_str,
553
539
                                     description = META_INFO['description'],
554
540
                                     author = META_INFO['author'],
555
 
                                     copyright = "(c) Canonical Ltd, 2005-2010",
 
541
                                     copyright = "(c) Canonical Ltd, 2005-2009",
556
542
                                     company_name = "Canonical Ltd.",
557
543
                                     comments = META_INFO['description'],
558
544
                                    )
571
557
    if sys.version.startswith('2.4'):
572
558
        # adding elementtree package
573
559
        additional_packages.add('elementtree')
574
 
    elif sys.version.startswith('2.6') or sys.version.startswith('2.5'):
 
560
    elif sys.version.startswith('2.5'):
575
561
        additional_packages.add('xml.etree')
576
562
    else:
577
563
        import warnings
623
609
            excludes.extend(["bzrlib.plugins." + d for d in dirs])
624
610
        x = []
625
611
        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"]:
 
612
            if os.path.splitext(i)[1] not in [".py", ".pyd", ".dll", ".mo"]:
631
613
                continue
632
614
            if i == '__init__.py' and root == 'bzrlib/plugins':
633
615
                continue
710
692
        # easy_install one
711
693
        DATA_FILES = [('man/man1', ['bzr.1'])]
712
694
 
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
695
    # std setup
727
696
    ARGS = {'scripts': ['bzr'],
728
697
            'data_files': DATA_FILES,