/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: 2011-02-18 13:01:03 UTC
  • Revision ID: jelmer@samba.org-20110218130103-fiyk203auk28thpn
Remove some unused imports, fix some formatting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
from distutils.core import setup, Command
7
7
from distutils.command.install_data import install_data
8
8
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
9
import os
22
10
import sys
23
11
 
37
25
 
38
26
    def run(self):
39
27
        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
 
28
        import __init__ as bzrgtk
 
29
        runner = TextTestRunner()
 
30
        loader = TestLoader()
43
31
        suite = TestSuite()
44
 
        loader = TestLoader()
45
 
        load_tests(suite, None, loader)
46
 
        runner = TextTestRunner()
 
32
        suite.addTest(bzrgtk.test_suite())
47
33
        result = runner.run(suite)
48
34
        return result.wasSuccessful()
49
35
 
91
77
    sub_commands.append(('build_credits', is_versioned))
92
78
 
93
79
 
94
 
class SourceDist(sdist):
95
 
    sub_commands = sdist.sub_commands[:]
96
 
    sub_commands.append(('build_credits', is_versioned))
97
 
 
98
 
 
99
80
class InstallData(install_data):
100
81
 
101
82
    def run(self):
169
150
                                             'icons/tag-16.png',
170
151
                                             'icons/bug.png',
171
152
                                             'icons/bzr-icon-64.png']),
172
 
                    # In case Python distutils extra is not available,
173
 
                    # install the .desktop files
174
153
                    ('share/applications', ['bazaar-properties.desktop',
175
154
                                            'bzr-handle-patch.desktop',
176
155
                                            'bzr-notify.desktop']),
188
167
        cmdclass={'install_data': InstallData,
189
168
                  'build_credits': CreateCredits,
190
169
                  'build': BuildData,
191
 
                  'build_i18n': cmd_build_i18n,
192
 
                  'sdist': SourceDist,
193
170
                  'check': Check}
194
171
        )