2
2
"""GTK+ Frontends for various Bazaar commands."""
4
from distutils.core import setup
4
from distutils.core import setup, Command
5
5
from distutils.command.install_data import install_data
6
6
from distutils.dep_util import newer
7
7
from distutils.log import info
13
description = "Run unit tests"
17
def initialize_options(self):
20
def finalize_options(self):
23
def get_command_name(self):
27
from bzrlib.tests import TestLoader, TestSuite, TextTestRunner
28
import __init__ as bzrgtk
29
runner = TextTestRunner()
32
suite.addTest(bzrgtk.test_suite())
33
result = runner.run(suite)
34
return result.wasSuccessful()
12
36
class InstallData(install_data):
14
38
self.data_files.extend(self._compile_po_files())
15
39
# Disable for now - performance issues
16
40
#self.data_files.extend(self._nautilus_plugin())
17
41
install_data.run(self)
44
subprocess.check_call('gtk-update-icon-cache -f -t /usr/share/icons/hicolor')
19
48
def _compile_po_files(self):
74
103
"bzrlib.plugins.gtk.viz": "viz",
75
104
"bzrlib.plugins.gtk.annotate": "annotate",
76
105
"bzrlib.plugins.gtk.olive": "olive",
77
"bzrlib.plugins.gtk.tests": "tests"
106
"bzrlib.plugins.gtk.tests": "tests",
107
"bzrlib.plugins.gtk.branchview": "branchview",
81
110
"bzrlib.plugins.gtk",
82
111
"bzrlib.plugins.gtk.viz",
83
112
"bzrlib.plugins.gtk.annotate",
84
113
"bzrlib.plugins.gtk.olive",
85
"bzrlib.plugins.gtk.tests"
114
"bzrlib.plugins.gtk.tests",
115
"bzrlib.plugins.gtk.branchview",
87
data_files=[('share/olive', ['olive.glade',
91
('share/olive/icons', [\
102
'icons/refresh.png']),
103
('share/applications', ['olive-gtk.desktop']),
104
('share/pixmaps', ['icons/olive-gtk.png'])
106
cmdclass={'install_data': InstallData}
117
data_files=[('share/olive', ['olive.glade',
120
('share/olive/icons', ['icons/commit.png',
121
'icons/commit16.png',
131
'icons/oliveicon2.png']),
132
('share/applications', ['olive-gtk.desktop',
133
'bazaar-properties.desktop',
134
'bzr-notify.desktop']),
135
('share/pixmaps', ['icons/olive-gtk.png']),
136
('share/icons/hicolor/scalable/emblems',
137
['icons/emblem-bzr-added.svg',
138
'icons/emblem-bzr-conflict.svg',
139
'icons/emblem-bzr-controlled.svg',
140
'icons/emblem-bzr-modified.svg',
141
'icons/emblem-bzr-removed.svg'])
143
cmdclass={'install_data': InstallData,