/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: 2009-12-02 11:12:51 UTC
  • Revision ID: v.ladeuil+lp@free.fr-20091202111251-sh0xqyqtuvitonne
Fix regressions in tests about merge being more strict by default.

* tests/test_commit.py:
(TestPendingRevisions.test_pending_revisions_multi_merge)
(TestCommitDialog.test_pending_multiple): Since there are pending
merges, we should force the merge to avoid the UncommittedChanges
exception.

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