/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: Jelmer Vernooij
  • Date: 2010-05-25 17:09:02 UTC
  • mto: This revision was merged to the branch mainline in revision 691.
  • Revision ID: jelmer@samba.org-20100525170902-3to8g5iw7ovw79kh
Split out olive into a separate directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
 
2
 
2
3
"""GTK+ Frontends for various Bazaar commands."""
3
4
 
4
 
from info import *
5
 
 
6
5
from distutils.core import setup, Command
7
6
from distutils.command.install_data import install_data
8
7
from distutils.command.build import build
9
 
from distutils.command.sdist import sdist
10
 
try:
11
 
    from DistUtilsExtra.command import *
12
 
except ImportError:
13
 
   # Python distutils extra is not available.
14
 
    class cmd_build_i18n(Command):
15
 
        def run(self):
16
 
            print >> sys.stderr, "For internationalization support you'll need to install https://launchpad.net/python-distutils-extra"
17
 
else:
18
 
    # Use build_i18n from DistUtilsExtra
19
 
    cmd_build_i18n = build_i18n.build_i18n
20
 
 
21
8
import os
22
9
import sys
23
10
 
37
24
 
38
25
    def run(self):
39
26
        from bzrlib.tests import TestLoader, TestSuite, TextTestRunner
40
 
        from bzrlib.plugin import PluginImporter
41
 
        PluginImporter.specific_paths["bzrlib.plugins.gtk"] = os.path.dirname(__file__)
42
 
        from bzrlib.plugins.gtk.tests import load_tests
 
27
        import __init__ as bzrgtk
 
28
        runner = TextTestRunner()
 
29
        loader = TestLoader()
43
30
        suite = TestSuite()
44
 
        loader = TestLoader()
45
 
        load_tests(suite, None, loader)
46
 
        runner = TextTestRunner()
 
31
        suite.addTest(bzrgtk.test_suite())
47
32
        result = runner.run(suite)
48
33
        return result.wasSuccessful()
49
34
 
65
50
    def run(self):
66
51
        from bzrlib.plugin import load_plugins; load_plugins()
67
52
        from bzrlib.branch import Branch
68
 
        from bzrlib.plugins.stats.cmds import find_credits
 
53
        from bzrlib.plugins.stats import find_credits
69
54
 
70
55
        import pickle
71
56
 
91
76
    sub_commands.append(('build_credits', is_versioned))
92
77
 
93
78
 
94
 
class SourceDist(sdist):
95
 
    sub_commands = sdist.sub_commands[:]
96
 
    sub_commands.append(('build_credits', is_versioned))
97
 
 
98
 
 
99
79
class InstallData(install_data):
100
80
 
101
81
    def run(self):
123
103
 
124
104
 
125
105
if __name__ == '__main__':
126
 
    version = bzr_plugin_version[:3]
127
 
    version_string = ".".join([str(x) for x in version])
128
106
    setup(
129
107
        name = "bzr-gtk",
130
 
        version = version_string,
 
108
        version = "0.99.0",
131
109
        maintainer = "Jelmer Vernooij",
132
110
        maintainer_email = "jelmer@samba.org",
133
111
        description = "GTK+ Frontends for various Bazaar commands",
169
147
                                             'icons/tag-16.png',
170
148
                                             'icons/bug.png',
171
149
                                             'icons/bzr-icon-64.png']),
172
 
                    # In case Python distutils extra is not available,
173
 
                    # install the .desktop files
174
150
                    ('share/applications', ['bazaar-properties.desktop',
175
151
                                            'bzr-handle-patch.desktop',
176
152
                                            'bzr-notify.desktop']),
177
153
                    ('share/application-registry', ['bzr-gtk.applications']),
178
154
                    ('share/pixmaps', ['icons/bzr-icon-64.png']),
179
 
                    ('share/icons/hicolor/scalable/apps', ['icons/bzr-panel.svg']),
180
155
                    ('share/icons/hicolor/scalable/emblems',
181
156
                     ['icons/emblem-bzr-added.svg',
182
157
                      'icons/emblem-bzr-conflict.svg',
188
163
        cmdclass={'install_data': InstallData,
189
164
                  'build_credits': CreateCredits,
190
165
                  'build': BuildData,
191
 
                  'build_i18n': cmd_build_i18n,
192
 
                  'sdist': SourceDist,
193
166
                  'check': Check}
194
167
        )