~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:45:40 UTC
  • Revision ID: jelmer@samba.org-20081014184540-jq9szd0ngh786q34
Run build_credits subcommand as part of ./setup.py build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        return True
64
64
 
65
65
 
 
66
def is_versioned(cmd):
 
67
    try:
 
68
        from bzrlib.branch import Branch
 
69
        Branch.open(".")
 
70
        return True
 
71
    except NotBranchError:
 
72
        return False
 
73
 
 
74
 
66
75
class BuildData(build):
67
 
    def run(self):
68
 
 
69
 
        return build.run(self)
 
76
    sub_commands = build.sub_commands[:]
 
77
    sub_commands.append(('build_credits', is_versioned))
70
78
 
71
79
 
72
80
class InstallData(install_data):
189
197
               ],
190
198
    cmdclass={'install_data': InstallData,
191
199
              'build_credits': CreateCredits,
 
200
              'build': BuildData,
192
201
              'check': Check}
193
202
)