/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-05-05 18:16:46 UTC
  • mto: (487.1.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 490.
  • Revision ID: v.ladeuil+lp@free.fr-20080505181646-n95l8ltw2u6jtr26
Fix bug #187283 fix replacing _() by _i18n().

* genpot.sh 
Remove duplication. Add the ability to specify the genrated pot
file on command-line for debugging purposes.

* po/olive-gtk.pot:
Regenerated.

* __init__.py, branch.py, branchview/treeview.py, checkout.py,
commit.py, conflicts.py, diff.py, errors.py, initialize.py,
merge.py, nautilus-bzr.py, olive/__init__.py, olive/add.py,
olive/bookmark.py, olive/guifiles.py, olive/info.py,
olive/menu.py, olive/mkdir.py, olive/move.py, olive/remove.py,
olive/rename.py, push.py, revbrowser.py, status.py, tags.py:
Replace all calls to _() by calls to _i18n(), the latter being
defined in __init__.py and imported in the other modules from
there. This fix the problem encountered countless times when
running bzr selftest and getting silly error messages about
boolean not being callables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
 
 
3
2
"""GTK+ Frontends for various Bazaar commands."""
4
3
 
5
4
from distutils.core import setup, Command
6
5
from distutils.command.install_data import install_data
7
 
from distutils.command.build import build
8
6
from distutils.dep_util import newer
9
7
from distutils.log import info
10
8
import glob
35
33
        result = runner.run(suite)
36
34
        return result.wasSuccessful()
37
35
 
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
 
 
82
36
class InstallData(install_data):
83
37
    def run(self):
84
38
        self.data_files.extend(self._compile_po_files())
125
79
        files = []
126
80
        if sys.platform[:5] == 'linux':
127
81
            cmd = os.popen('pkg-config --variable=pythondir nautilus-python', 'r')
128
 
            res = cmd.readline().strip()
 
82
            res = cmd.readline()
129
83
            ret = cmd.close()
130
84
            
131
85
            if ret is None:
137
91
 
138
92
setup(
139
93
    name = "bzr-gtk",
140
 
    version = "0.98.0",
 
94
    version = "0.94.0rc1",
141
95
    maintainer = "Jelmer Vernooij",
142
96
    maintainer_email = "jelmer@samba.org",
143
97
    description = "GTK+ Frontends for various Bazaar commands",
144
 
    license = "GNU GPL v2 or later",
145
 
    scripts = ['olive-gtk', 'bzr-handle-patch', 'bzr-notify'],
146
 
    url = "http://bazaar-vcs.org/BzrGtk",
 
98
    license = "GNU GPL v2",
 
99
    scripts=['olive-gtk'],
147
100
    package_dir = {
148
101
        "bzrlib.plugins.gtk": ".",
149
 
        "bzrlib.plugins.gtk.viz": "viz",
 
102
        "bzrlib.plugins.gtk.viz": "viz", 
150
103
        "bzrlib.plugins.gtk.annotate": "annotate",
151
104
        "bzrlib.plugins.gtk.olive": "olive",
152
105
        "bzrlib.plugins.gtk.tests": "tests",
153
106
        "bzrlib.plugins.gtk.branchview": "branchview",
154
 
        "bzrlib.plugins.gtk.preferences": "preferences",
155
107
        },
156
108
    packages = [
157
109
        "bzrlib.plugins.gtk",
160
112
        "bzrlib.plugins.gtk.olive",
161
113
        "bzrlib.plugins.gtk.tests",
162
114
        "bzrlib.plugins.gtk.branchview",
163
 
        "bzrlib.plugins.gtk.preferences",
164
115
        ],
165
 
    data_files=[('share/olive', ['cmenu.ui',
 
116
    data_files=[('share/olive', ['olive.glade',
 
117
                                 'cmenu.ui',
166
118
                                ]),
167
 
                ('share/bzr-gtk', ['credits.pickle']),
168
 
               ('share/bzr-gtk/icons', ['icons/commit.png',
 
119
                ('share/olive/icons', ['icons/commit.png',
169
120
                                 'icons/commit16.png',
170
121
                                 'icons/diff.png',
171
122
                                 'icons/diff16.png',
176
127
                                 'icons/push.png',
177
128
                                 'icons/push16.png',
178
129
                                 'icons/refresh.png',
179
 
                                 'icons/olive-gtk.png',
180
 
                                 'icons/oliveicon2.png',
181
 
                                 'icons/sign-bad.png',
 
130
                                 'icons/oliveicon2.png']),
 
131
                ('share/bzr-gtk/icons', ['icons/sign-bad.png',
182
132
                                 'icons/sign-ok.png',
183
133
                                 'icons/sign.png',
184
134
                                 'icons/sign-unknown.png',
185
 
                                 'icons/tag-16.png',
186
135
                                 'icons/bug.png',
187
136
                                 'icons/bzr-icon-64.png']),
188
137
                ('share/applications', ['olive-gtk.desktop',
190
139
                                        'bzr-handle-patch.desktop',
191
140
                                        'bzr-notify.desktop']),
192
141
                ('share/application-registry', ['bzr-gtk.applications']),
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',
 
142
                ('share/pixmaps', ['icons/olive-gtk.png', 'icons/bzr-icon-64.png']),
 
143
                ('share/icons/hicolor/scalable/emblems', 
 
144
                    ['icons/emblem-bzr-added.svg', 
 
145
                        'icons/emblem-bzr-conflict.svg', 
 
146
                        'icons/emblem-bzr-controlled.svg', 
199
147
                        'icons/emblem-bzr-modified.svg',
200
 
                        'icons/emblem-bzr-removed.svg',
201
 
                        'icons/emblem-bzr-ignored.svg'])
 
148
                        'icons/emblem-bzr-removed.svg'])
202
149
               ],
203
150
    cmdclass={'install_data': InstallData,
204
 
              'build_credits': CreateCredits,
205
 
              'build': BuildData,
206
151
              'check': Check}
207
152
)