/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: 2008-06-29 18:12:29 UTC
  • mto: This revision was merged to the branch mainline in revision 519.
  • Revision ID: jelmer@samba.org-20080629181229-1l2m4cf7vvbyh8qg
Simplify progress bar code, use embedded progress bar inside viz window.

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 = []
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
 
 
81
36
class InstallData(install_data):
82
37
    def run(self):
83
38
        self.data_files.extend(self._compile_po_files())
124
79
        files = []
125
80
        if sys.platform[:5] == 'linux':
126
81
            cmd = os.popen('pkg-config --variable=pythondir nautilus-python', 'r')
127
 
            res = cmd.readline().strip()
 
82
            res = cmd.readline()
128
83
            ret = cmd.close()
129
84
            
130
85
            if ret is None:
136
91
 
137
92
setup(
138
93
    name = "bzr-gtk",
139
 
    version = "0.96.0",
 
94
    version = "0.95.0",
140
95
    maintainer = "Jelmer Vernooij",
141
96
    maintainer_email = "jelmer@samba.org",
142
97
    description = "GTK+ Frontends for various Bazaar commands",
143
98
    license = "GNU GPL v2 or later",
144
 
    scripts = ['olive-gtk', 'bzr-handle-patch', 'bzr-notify'],
145
 
    url = "http://bazaar-vcs.org/BzrGtk",
 
99
    scripts=['olive-gtk', 'bzr-handle-patch'],
146
100
    package_dir = {
147
101
        "bzrlib.plugins.gtk": ".",
148
102
        "bzrlib.plugins.gtk.viz": "viz", 
161
115
        "bzrlib.plugins.gtk.branchview",
162
116
        "bzrlib.plugins.gtk.preferences",
163
117
        ],
164
 
    data_files=[('share/olive', ['cmenu.ui',
 
118
    data_files=[('share/olive', ['olive.glade',
 
119
                                 'cmenu.ui',
165
120
                                ]),
166
 
                ('share/bzr-gtk', ['credits.pickle']),
167
 
               ('share/bzr-gtk/icons', ['icons/commit.png',
 
121
                ('share/olive/icons', ['icons/commit.png',
168
122
                                 'icons/commit16.png',
169
123
                                 'icons/diff.png',
170
124
                                 'icons/diff16.png',
175
129
                                 'icons/push.png',
176
130
                                 'icons/push16.png',
177
131
                                 'icons/refresh.png',
178
 
                                 'icons/olive-gtk.png',
179
 
                                 'icons/oliveicon2.png',
180
 
                                 'icons/sign-bad.png',
 
132
                                 'icons/oliveicon2.png']),
 
133
                ('share/bzr-gtk/icons', ['icons/sign-bad.png',
181
134
                                 'icons/sign-ok.png',
182
135
                                 'icons/sign.png',
183
136
                                 'icons/sign-unknown.png',
184
 
                                 'icons/tag-16.png',
185
137
                                 'icons/bug.png',
186
138
                                 'icons/bzr-icon-64.png']),
187
139
                ('share/applications', ['olive-gtk.desktop',
198
150
                        'icons/emblem-bzr-removed.svg'])
199
151
               ],
200
152
    cmdclass={'install_data': InstallData,
201
 
              'build_credits': CreateCredits,
202
 
              'build': BuildData,
203
153
              'check': Check}
204
154
)