[Pkg-bazaar-commits] ./bzr-gtk/unstable r609: Run build_credits subcommand as part of ./setup.py build.

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:50:54 UTC 2009


------------------------------------------------------------
revno: 609
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Tue 2008-10-14 20:45:40 +0200
message:
  Run build_credits subcommand as part of ./setup.py build.
modified:
  setup.py
-------------- next part --------------
=== modified file 'setup.py'
--- a/setup.py	2008-10-14 18:38:54 +0000
+++ b/setup.py	2008-10-14 18:45:40 +0000
@@ -63,10 +63,18 @@
         return True
 
 
+def is_versioned(cmd):
+    try:
+        from bzrlib.branch import Branch
+        Branch.open(".")
+        return True
+    except NotBranchError:
+        return False
+
+
 class BuildData(build):
-    def run(self):
-
-        return build.run(self)
+    sub_commands = build.sub_commands[:]
+    sub_commands.append(('build_credits', is_versioned))
 
 
 class InstallData(install_data):
@@ -189,5 +197,6 @@
                ],
     cmdclass={'install_data': InstallData,
               'build_credits': CreateCredits,
+              'build': BuildData,
               'check': Check}
 )



More information about the Pkg-bazaar-commits mailing list