/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: Vincent Ladeuil
  • Date: 2008-10-23 08:14:59 UTC
  • mto: This revision was merged to the branch mainline in revision 618.
  • Revision ID: v.ladeuil+lp@free.fr-20081023081459-3rgjsohomf8rbe44
Fix bug #131589 by using a gtk.Window instead of a gtk.Dialog.

* status.py:
(StatusWindow): Renamed from StatusDialog, we're a window now.
(StatusWindow.__init__, StatusWindow._create): Adjusted to Window
inheritance.

* __init__.py:
(cmd_gstatus.run): Use a Window instead of a dialog.

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
5
from distutils.core import setup, Command
5
6
from distutils.command.install_data import install_data
 
7
from distutils.command.build import build
6
8
from distutils.dep_util import newer
7
9
from distutils.log import info
8
10
import glob
33
35
        result = runner.run(suite)
34
36
        return result.wasSuccessful()
35
37
 
 
38
 
 
39
class CreateCredits(Command):
 
40
    description = "Create credits file"
 
41
 
 
42
    user_options = []
 
43
 
 
44
    def initialize_options(self):
 
45
        pass
 
46
 
 
47
    def finalize_options(self):
 
48
        pass
 
49
 
 
50
    def get_command_name(self):
 
51
        return 'test'
 
52
 
 
53
    def run(self):
 
54
        from bzrlib.branch import Branch
 
55
        from bzrlib.plugins.stats import find_credits
 
56
 
 
57
        import pickle
 
58
 
 
59
        branch = Branch.open(".")
 
60
        credits = find_credits(branch.repository, branch.last_revision())
 
61
 
 
62
        pickle.dump(credits, file("credits.pickle", 'w'))
 
63
        return True
 
64
 
 
65
 
 
66
def is_versioned(cmd):
 
67
    from bzrlib.errors import NotBranchError
 
68
    try:
 
69
        from bzrlib.branch import Branch
 
70
        Branch.open(".")
 
71
        return True
 
72
    except NotBranchError:
 
73
        return False
 
74
 
 
75
 
 
76
class BuildData(build):
 
77
    sub_commands = build.sub_commands[:]
 
78
    sub_commands.append(('build_credits', is_versioned))
 
79
 
 
80
 
36
81
class InstallData(install_data):
37
82
    def run(self):
38
83
        self.data_files.extend(self._compile_po_files())
79
124
        files = []
80
125
        if sys.platform[:5] == 'linux':
81
126
            cmd = os.popen('pkg-config --variable=pythondir nautilus-python', 'r')
82
 
            res = cmd.readline()
 
127
            res = cmd.readline().strip()
83
128
            ret = cmd.close()
84
129
            
85
130
            if ret is None:
91
136
 
92
137
setup(
93
138
    name = "bzr-gtk",
94
 
    version = "0.95.0",
 
139
    version = "0.96.0",
95
140
    maintainer = "Jelmer Vernooij",
96
141
    maintainer_email = "jelmer@samba.org",
97
142
    description = "GTK+ Frontends for various Bazaar commands",
98
143
    license = "GNU GPL v2 or later",
99
 
    scripts=['olive-gtk', 'bzr-handle-patch'],
 
144
    scripts = ['olive-gtk', 'bzr-handle-patch', 'bzr-notify'],
 
145
    url = "http://bazaar-vcs.org/BzrGtk",
100
146
    package_dir = {
101
147
        "bzrlib.plugins.gtk": ".",
102
148
        "bzrlib.plugins.gtk.viz": "viz", 
115
161
        "bzrlib.plugins.gtk.branchview",
116
162
        "bzrlib.plugins.gtk.preferences",
117
163
        ],
118
 
    data_files=[('share/olive', ['olive.glade',
119
 
                                 'cmenu.ui',
 
164
    data_files=[('share/olive', ['cmenu.ui',
120
165
                                ]),
121
 
                ('share/olive/icons', ['icons/commit.png',
 
166
                ('share/bzr-gtk', ['credits.pickle']),
 
167
               ('share/bzr-gtk/icons', ['icons/commit.png',
122
168
                                 'icons/commit16.png',
123
169
                                 'icons/diff.png',
124
170
                                 'icons/diff16.png',
129
175
                                 'icons/push.png',
130
176
                                 'icons/push16.png',
131
177
                                 'icons/refresh.png',
132
 
                                 'icons/oliveicon2.png']),
133
 
                ('share/bzr-gtk/icons', ['icons/sign-bad.png',
 
178
                                 'icons/olive-gtk.png',
 
179
                                 'icons/oliveicon2.png',
 
180
                                 'icons/sign-bad.png',
134
181
                                 'icons/sign-ok.png',
135
182
                                 'icons/sign.png',
136
183
                                 'icons/sign-unknown.png',
 
184
                                 'icons/tag-16.png',
137
185
                                 'icons/bug.png',
138
186
                                 'icons/bzr-icon-64.png']),
139
187
                ('share/applications', ['olive-gtk.desktop',
150
198
                        'icons/emblem-bzr-removed.svg'])
151
199
               ],
152
200
    cmdclass={'install_data': InstallData,
 
201
              'build_credits': CreateCredits,
 
202
              'build': BuildData,
153
203
              'check': Check}
154
204
)