~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Andrew Bennetts
  • Date: 2011-03-24 00:13:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5739.
  • Revision ID: andrew.bennetts@canonical.com-20110324001310-5w56qjom53j091r3
Minor English tweaks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
import os
10
10
import os.path
11
11
import sys
 
12
import copy
12
13
 
13
14
if sys.version_info < (2, 4):
14
15
    sys.stderr.write("[ERROR] Not a supported Python version. Need 2.4+\n")
65
66
            'package_data': {'bzrlib': ['doc/api/*.txt',
66
67
                                        'tests/test_patches_data/*',
67
68
                                        'help_topics/en/*.txt',
 
69
                                        'tests/ssl_certs/ca.crt',
68
70
                                        'tests/ssl_certs/server_without_pass.key',
69
71
                                        'tests/ssl_certs/server_with_pass.key',
70
72
                                        'tests/ssl_certs/server.crt'
289
291
        # The code it generates re-uses a "local" pointer and
290
292
        # calls "PY_DECREF" after having set it to NULL. (It mixes PY_XDECREF
291
293
        # which is NULL safe with PY_DECREF which is not.)
292
 
        # <https://bugs.edge.launchpad.net/bzr/+bug/449372>
293
 
        # <https://bugs.edge.launchpad.net/bzr/+bug/276868>
 
294
        # <https://bugs.launchpad.net/bzr/+bug/449372>
 
295
        # <https://bugs.launchpad.net/bzr/+bug/276868>
294
296
        print('Cannot build extension "bzrlib._dirstate_helpers_pyx" using')
295
 
        print('your version of pyrex "%s". Please upgrade your pyrex' % (
296
 
            pyrex_version,))
 
297
        print('your version of pyrex "%s". Please upgrade your pyrex'
 
298
              % (pyrex_version,))
297
299
        print('install. For now, the non-compiled (python) version will')
298
300
        print('be used instead.')
299
301
    else:
393
395
    # ditto for the tbzrcommand tool
394
396
    tbzrcommand = dict(
395
397
        script = os.path.join(tbzr_root, "scripts", "tbzrcommand.py"),
396
 
        icon_resources = [(0,'bzr.ico')],
 
398
        icon_resources = icon_resources,
 
399
        other_resources = other_resources,
397
400
    )
398
401
    console_targets.append(tbzrcommand)
399
402
    tbzrcommandw = tbzrcommand.copy()
557
560
                                     company_name = "Canonical Ltd.",
558
561
                                     comments = META_INFO['description'],
559
562
                                    )
 
563
    gui_target = copy.copy(target)
 
564
    gui_target.dest_base = "bzrw"
560
565
 
561
566
    packages = BZRLIB['packages']
562
567
    packages.remove('bzrlib')
647
652
    console_targets = [target,
648
653
                       'tools/win32/bzr_postinstall.py',
649
654
                       ]
650
 
    gui_targets = []
 
655
    gui_targets = [gui_target]
651
656
    data_files = topics_files + plugins_files
652
657
 
653
658
    if 'qbzr' in plugins:
685
690
 
686
691
    # MSWSOCK.dll is a system-specific library, which py2exe accidentally pulls
687
692
    # in on Vista.
688
 
    dll_excludes.extend(["MSWSOCK.dll", "MSVCP60.dll", "powrprof.dll"])
 
693
    dll_excludes.extend(["MSWSOCK.dll",
 
694
                         "MSVCP60.dll",
 
695
                         "MSVCP90.dll",
 
696
                         "powrprof.dll",
 
697
                         "SHFOLDER.dll"])
689
698
    options_list = {"py2exe": {"packages": packages + list(additional_packages),
690
699
                               "includes": includes,
691
700
                               "excludes": excludes,
692
701
                               "dll_excludes": dll_excludes,
693
702
                               "dist_dir": "win32_bzr.exe",
694
703
                               "optimize": 2,
 
704
                               "custom_boot_script":
 
705
                                        "tools/win32/py2exe_boot_common.py",
695
706
                              },
696
707
                   }
697
708
 
722
733
        # easy_install one
723
734
        DATA_FILES = [('man/man1', ['bzr.1'])]
724
735
 
725
 
    if sys.platform != 'win32':
726
 
        # see https://wiki.kubuntu.org/Apport/DeveloperHowTo
727
 
        #
728
 
        # checking the paths and hardcoding the check for root is a bit gross,
729
 
        # but I don't see a cleaner way to find out the locations in a way
730
 
        # that's going to align with the hardcoded paths in apport.
731
 
        if os.geteuid() == 0:
732
 
            DATA_FILES += [
733
 
                ('/usr/share/apport/package-hooks',
734
 
                    ['apport/source_bzr.py']),
735
 
                ('/etc/apport/crashdb.conf.d/',
736
 
                    ['apport/bzr-crashdb.conf']),]
737
 
 
738
736
    # std setup
739
737
    ARGS = {'scripts': ['bzr'],
740
738
            'data_files': DATA_FILES,