diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2006-07-21 16:42:54 -0400 |
---|---|---|
committer | John Palmieri <johnp@remedyz.boston.redhat.com> | 2006-07-21 16:42:54 -0400 |
commit | 163206f228efad53051677a08d3813fcc5d0ab97 (patch) | |
tree | d02d92740a13f1b22a3a6f35e29f3bf804d2ef15 /setup.py | |
parent | f262d88279991faba06578dde48d0c607ce4b0b8 (diff) |
* Automate building of ChangeLog
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -24,6 +24,7 @@ class full_clean(clean): remove("dbus/dbus_bindings.pxd") remove("dbus/dbus_bindings.c") remove("dbus/dbus_glib_bindings.c") + remove("ChangeLog") includedirs_flag = ['-I.'] dbus_includes = ['.'] @@ -51,6 +52,23 @@ if error: includedirs_flag.extend(output.split()) dbus_glib_includes.extend([ x.replace("-I", "") for x in output.split() ]) +#create ChangeLog only if this is a git repo +if os.path.exists(".git"): + pipe = os.popen3("git-log --stat") + output = pipe[1].read().strip() + error = pipe[2].read().strip() + + for p in pipe: + p.close() + + if error: + print "ERROR: running git-log (%s)" % (error) + raise SystemExit + + file = open("ChangeLog", "w") + file.writelines(output) + file.close() + output = open("dbus/dbus_bindings.pxd", 'w') includedirs_flag.append('-Idbus/') extract.main("dbus/dbus_bindings.pxd.in", includedirs_flag, output) |