/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Curtis Hovey
  • Date: 2011-09-03 01:25:04 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110903012504-0jr4diz9033g5df2
Menu fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
"""GTK+ Frontends for various Bazaar commands."""
3
3
 
4
 
import os
5
 
import sys
6
 
 
7
 
from info import bzr_plugin_version
 
4
from info import *
8
5
 
9
6
from distutils.core import setup, Command
10
7
from distutils.command.install_data import install_data
11
8
from distutils.command.build import build
12
9
from distutils.command.sdist import sdist
13
10
try:
14
 
    from DistUtilsExtra.command import build_i18n
 
11
    from DistUtilsExtra.command import *
15
12
except ImportError:
16
 
    # Python distutils extra is not available.
17
 
    class cmd_build_i18n(build):
18
 
        user_options = []
19
 
 
20
 
        def initialize_options(self):
21
 
            self.domain = None
22
 
            self.desktop_files = None
23
 
 
24
 
        def finalize_options(self):
25
 
            pass
26
 
 
 
13
   # Python distutils extra is not available.
 
14
    class cmd_build_i18n(Command):
27
15
        def run(self):
28
 
            print >> sys.stderr, (
29
 
                "For internationalization support you'll need to install "
30
 
                "https://launchpad.net/python-distutils-extra")
 
16
            print >> sys.stderr, "For internationalization support you'll need to install https://launchpad.net/python-distutils-extra"
31
17
else:
32
18
    # Use build_i18n from DistUtilsExtra
33
19
    cmd_build_i18n = build_i18n.build_i18n
34
20
 
 
21
import os
 
22
import sys
35
23
 
36
24
class Check(Command):
37
25
    description = "Run unit tests"
38
26
 
39
 
    user_options = [
40
 
        ('module=', 'm', 'The test module to run'),
41
 
        ]
 
27
    user_options = []
42
28
 
43
29
    def initialize_options(self):
44
 
        self.module = None
 
30
        pass
45
31
 
46
32
    def finalize_options(self):
47
33
        pass
52
38
    def run(self):
53
39
        from bzrlib.tests import TestLoader, TestSuite, TextTestRunner
54
40
        from bzrlib.plugin import PluginImporter
55
 
        PluginImporter.specific_paths["bzrlib.plugins.gtk"] = os.path.dirname(
56
 
            __file__)
 
41
        PluginImporter.specific_paths["bzrlib.plugins.gtk"] = os.path.dirname(__file__)
57
42
        from bzrlib.plugins.gtk.tests import load_tests
58
43
        suite = TestSuite()
59
44
        loader = TestLoader()
60
 
        load_tests(suite, self.module, loader)
 
45
        load_tests(suite, None, loader)
61
46
        runner = TextTestRunner()
62
47
        result = runner.run(suite)
63
48
        return result.wasSuccessful()
78
63
        return 'build_credits'
79
64
 
80
65
    def run(self):
81
 
        from bzrlib.plugin import load_plugins
82
 
        load_plugins()
 
66
        from bzrlib.plugin import load_plugins; load_plugins()
83
67
        from bzrlib.branch import Branch
84
68
        from bzrlib.plugins.stats.cmds import find_credits
85
69
 
142
126
    version = bzr_plugin_version[:3]
143
127
    version_string = ".".join([str(x) for x in version])
144
128
    setup(
145
 
        name="bzr-gtk",
146
 
        version=version_string,
147
 
        maintainer="Jelmer Vernooij",
148
 
        maintainer_email="jelmer@samba.org",
149
 
        description="GTK+ Frontends for various Bazaar commands",
150
 
        license="GNU GPL v2 or later",
151
 
        scripts=['bzr-handle-patch', 'bzr-notify'],
152
 
        url="http://bazaar-vcs.org/BzrGtk",
153
 
        package_dir={
 
129
        name = "bzr-gtk",
 
130
        version = version_string,
 
131
        maintainer = "Jelmer Vernooij",
 
132
        maintainer_email = "jelmer@samba.org",
 
133
        description = "GTK+ Frontends for various Bazaar commands",
 
134
        license = "GNU GPL v2 or later",
 
135
        scripts = ['bzr-handle-patch', 'bzr-notify'],
 
136
        url = "http://bazaar-vcs.org/BzrGtk",
 
137
        package_dir = {
154
138
            "bzrlib.plugins.gtk": ".",
155
139
            "bzrlib.plugins.gtk.viz": "viz",
156
140
            "bzrlib.plugins.gtk.annotate": "annotate",
158
142
            "bzrlib.plugins.gtk.branchview": "branchview",
159
143
            "bzrlib.plugins.gtk.preferences": "preferences",
160
144
            },
161
 
        packages=[
 
145
        packages = [
162
146
            "bzrlib.plugins.gtk",
163
147
            "bzrlib.plugins.gtk.viz",
164
148
            "bzrlib.plugins.gtk.annotate",
166
150
            "bzrlib.plugins.gtk.branchview",
167
151
            "bzrlib.plugins.gtk.preferences",
168
152
        ],
169
 
        data_files=[('share/bzr-gtk', ['credits.pickle']),
 
153
        data_files=[ ('share/bzr-gtk', ['credits.pickle']),
170
154
                    ('share/bzr-gtk/icons', ['icons/commit.png',
171
155
                                             'icons/commit16.png',
172
156
                                             'icons/diff.png',
190
174
                    ('share/applications', ['bazaar-properties.desktop',
191
175
                                            'bzr-handle-patch.desktop',
192
176
                                            'bzr-notify.desktop']),
193
 
                    ('share/application-registry', ['bzr-gtk.applications']),
 
177
                    ('share/application-registry', ['bzr-Gtk.applications']),
194
178
                    ('share/pixmaps', ['icons/bzr-icon-64.png']),
195
 
                    ('share/icons/hicolor/scalable/apps',
196
 
                        ['icons/bzr-panel.svg']),
 
179
                    ('share/icons/hicolor/scalable/apps', ['icons/bzr-panel.svg']),
197
180
                    ('share/icons/hicolor/scalable/emblems',
198
181
                     ['icons/emblem-bzr-added.svg',
199
182
                      'icons/emblem-bzr-conflict.svg',