/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: 2012-09-02 19:29:42 UTC
  • mfrom: (794.1.1 get_style_context)
  • Revision ID: sinzui.is@verizon.net-20120902192942-cwtww9wxvznx0wod
Do not call deprecated get_style(); use get_style_context().

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