~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Matthew Gordon
  • Date: 2010-09-29 01:57:02 UTC
  • mto: (5487.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5488.
  • Revision ID: mgordon@ivs3d.com-20100929015702-16w9ejt21oysws45
Tested push --no-tree ang gor it working right.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
            'package_data': {'bzrlib': ['doc/api/*.txt',
67
67
                                        'tests/test_patches_data/*',
68
68
                                        'help_topics/en/*.txt',
69
 
                                        'tests/ssl_certs/ca.crt',
70
69
                                        'tests/ssl_certs/server_without_pass.key',
71
70
                                        'tests/ssl_certs/server_with_pass.key',
72
 
                                        'tests/ssl_certs/server.crt',
73
 
                                        'locale/*/LC_MESSAGES/*.mo',
 
71
                                        'tests/ssl_certs/server.crt'
74
72
                                       ]},
75
73
           }
76
74
 
153
151
    Generate bzr.1.
154
152
    """
155
153
 
156
 
    sub_commands = build.sub_commands + [
157
 
            ('build_mo', lambda _: True),
158
 
            ]
159
 
 
160
154
    def run(self):
161
155
        build.run(self)
162
156
 
168
162
## Setup
169
163
########################
170
164
 
171
 
from tools.build_mo import build_mo
172
 
 
173
165
command_classes = {'install_scripts': my_install_scripts,
174
 
                   'build': bzr_build,
175
 
                   'build_mo': build_mo,
176
 
                   }
 
166
                   'build': bzr_build}
177
167
from distutils import log
178
168
from distutils.errors import CCompilerError, DistutilsPlatformError
179
169
from distutils.extension import Extension
300
290
        # The code it generates re-uses a "local" pointer and
301
291
        # calls "PY_DECREF" after having set it to NULL. (It mixes PY_XDECREF
302
292
        # which is NULL safe with PY_DECREF which is not.)
303
 
        # <https://bugs.launchpad.net/bzr/+bug/449372>
304
 
        # <https://bugs.launchpad.net/bzr/+bug/276868>
 
293
        # <https://bugs.edge.launchpad.net/bzr/+bug/449372>
 
294
        # <https://bugs.edge.launchpad.net/bzr/+bug/276868>
305
295
        print('Cannot build extension "bzrlib._dirstate_helpers_pyx" using')
306
 
        print('your version of pyrex "%s". Please upgrade your pyrex'
307
 
              % (pyrex_version,))
 
296
        print('your version of pyrex "%s". Please upgrade your pyrex' % (
 
297
            pyrex_version,))
308
298
        print('install. For now, the non-compiled (python) version will')
309
299
        print('be used instead.')
310
300
    else:
404
394
    # ditto for the tbzrcommand tool
405
395
    tbzrcommand = dict(
406
396
        script = os.path.join(tbzr_root, "scripts", "tbzrcommand.py"),
407
 
        icon_resources = icon_resources,
408
 
        other_resources = other_resources,
 
397
        icon_resources = [(0,'bzr.ico')],
409
398
    )
410
399
    console_targets.append(tbzrcommand)
411
400
    tbzrcommandw = tbzrcommand.copy()
699
688
 
700
689
    # MSWSOCK.dll is a system-specific library, which py2exe accidentally pulls
701
690
    # in on Vista.
702
 
    dll_excludes.extend(["MSWSOCK.dll",
703
 
                         "MSVCP60.dll",
704
 
                         "MSVCP90.dll",
705
 
                         "powrprof.dll",
706
 
                         "SHFOLDER.dll"])
 
691
    dll_excludes.extend(["MSWSOCK.dll", "MSVCP60.dll", "powrprof.dll"])
707
692
    options_list = {"py2exe": {"packages": packages + list(additional_packages),
708
693
                               "includes": includes,
709
694
                               "excludes": excludes,
742
727
        # easy_install one
743
728
        DATA_FILES = [('man/man1', ['bzr.1'])]
744
729
 
 
730
    if sys.platform != 'win32':
 
731
        # see https://wiki.kubuntu.org/Apport/DeveloperHowTo
 
732
        #
 
733
        # checking the paths and hardcoding the check for root is a bit gross,
 
734
        # but I don't see a cleaner way to find out the locations in a way
 
735
        # that's going to align with the hardcoded paths in apport.
 
736
        if os.geteuid() == 0:
 
737
            DATA_FILES += [
 
738
                ('/usr/share/apport/package-hooks',
 
739
                    ['apport/source_bzr.py']),
 
740
                ('/etc/apport/crashdb.conf.d/',
 
741
                    ['apport/bzr-crashdb.conf']),]
 
742
 
745
743
    # std setup
746
744
    ARGS = {'scripts': ['bzr'],
747
745
            'data_files': DATA_FILES,