~jameinel/bzr-gtk/sanitize_commit_messages

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Jelmer Vernooij
  • Date: 2008-10-14 18:38:54 UTC
  • Revision ID: jelmer@samba.org-20081014183854-5x9q8atr3hxg5j63
Merge create-credits into setup.py.

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
class BuildData(build):
 
67
    def run(self):
 
68
 
 
69
        return build.run(self)
 
70
 
 
71
 
36
72
class InstallData(install_data):
37
73
    def run(self):
38
74
        self.data_files.extend(self._compile_po_files())
96
132
    maintainer_email = "jelmer@samba.org",
97
133
    description = "GTK+ Frontends for various Bazaar commands",
98
134
    license = "GNU GPL v2 or later",
99
 
    scripts=['olive-gtk', 'bzr-handle-patch', 'bzr-notify'],
100
 
    homepage = "http://bazaar-vcs.org/BzrGtk",
 
135
    scripts = ['olive-gtk', 'bzr-handle-patch', 'bzr-notify'],
101
136
    package_dir = {
102
137
        "bzrlib.plugins.gtk": ".",
103
138
        "bzrlib.plugins.gtk.viz": "viz", 
153
188
                        'icons/emblem-bzr-removed.svg'])
154
189
               ],
155
190
    cmdclass={'install_data': InstallData,
 
191
              'build_credits': CreateCredits,
156
192
              'check': Check}
157
193
)