/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: John Arbash Meinel
  • Date: 2009-12-02 23:09:40 UTC
  • mfrom: (4853.1.1 whitespace)
  • mto: This revision was merged to the branch mainline in revision 4856.
  • Revision ID: john@arbash-meinel.com-20091202230940-7n2aydoxngdqxzld
Strip trailing whitespace from doc files by Patrick Regan.

Resolve one small conflict with another doc edit.
Also, revert the changes to all the .pdf and .png files. We shouldn't
be touching them as they are pure-binary files.

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:
532
518
            install_data.run(self)
533
519
 
534
520
            py2exe = self.distribution.get_command_obj('py2exe', False)
535
 
            # GZ 2010-04-19: Setup has py2exe.optimize as 2, but give plugins
536
 
            #                time before living with docstring stripping
537
 
            optimize = 1
 
521
            optimize = py2exe.optimize
538
522
            compile_names = [f for f in self.outfiles if f.endswith('.py')]
539
523
            byte_compile(compile_names,
540
524
                         optimize=optimize,
541
525
                         force=self.force, prefix=self.install_dir,
542
526
                         dry_run=self.dry_run)
543
 
            self.outfiles.extend([f + 'o' for f in compile_names])
 
527
            if optimize:
 
528
                suffix = 'o'
 
529
            else:
 
530
                suffix = 'c'
 
531
            self.outfiles.extend([f + suffix for f in compile_names])
544
532
    # end of class install_data_with_bytecompile
545
533
 
546
534
    target = py2exe.build_exe.Target(script = "bzr",
550
538
                                     version = version_str,
551
539
                                     description = META_INFO['description'],
552
540
                                     author = META_INFO['author'],
553
 
                                     copyright = "(c) Canonical Ltd, 2005-2010",
 
541
                                     copyright = "(c) Canonical Ltd, 2005-2009",
554
542
                                     company_name = "Canonical Ltd.",
555
543
                                     comments = META_INFO['description'],
556
544
                                    )
569
557
    if sys.version.startswith('2.4'):
570
558
        # adding elementtree package
571
559
        additional_packages.add('elementtree')
572
 
    elif sys.version.startswith('2.6') or sys.version.startswith('2.5'):
 
560
    elif sys.version.startswith('2.5'):
573
561
        additional_packages.add('xml.etree')
574
562
    else:
575
563
        import warnings
621
609
            excludes.extend(["bzrlib.plugins." + d for d in dirs])
622
610
        x = []
623
611
        for i in files:
624
 
            # Throw away files we don't want packaged. Note that plugins may
625
 
            # have data files with all sorts of extensions so we need to
626
 
            # be conservative here about what we ditch.
627
 
            ext = os.path.splitext(i)[1]
628
 
            if ext.endswith('~') or ext in [".pyc", ".swp"]:
 
612
            if os.path.splitext(i)[1] not in [".py", ".pyd", ".dll", ".mo"]:
629
613
                continue
630
614
            if i == '__init__.py' and root == 'bzrlib/plugins':
631
615
                continue
688
672
                               "excludes": excludes,
689
673
                               "dll_excludes": dll_excludes,
690
674
                               "dist_dir": "win32_bzr.exe",
691
 
                               "optimize": 2,
 
675
                               "optimize": 1,
692
676
                              },
693
677
                   }
694
678
 
708
692
        # easy_install one
709
693
        DATA_FILES = [('man/man1', ['bzr.1'])]
710
694
 
711
 
    if sys.platform != 'win32':
712
 
        # see https://wiki.kubuntu.org/Apport/DeveloperHowTo
713
 
        #
714
 
        # checking the paths and hardcoding the check for root is a bit gross,
715
 
        # but I don't see a cleaner way to find out the locations in a way
716
 
        # that's going to align with the hardcoded paths in apport.
717
 
        if os.geteuid() == 0:
718
 
            DATA_FILES += [
719
 
                ('/usr/share/apport/package-hooks',
720
 
                    ['apport/source_bzr.py']),
721
 
                ('/etc/apport/crashdb.conf.d/',
722
 
                    ['apport/bzr-crashdb.conf']),]
723
 
 
724
695
    # std setup
725
696
    ARGS = {'scripts': ['bzr'],
726
697
            'data_files': DATA_FILES,