Automatically set the version in setup.py from the changelog.
authorCameron Dale <camrdale@gmail.com>
Thu, 21 Feb 2008 19:10:38 +0000 (11:10 -0800)
committerCameron Dale <camrdale@gmail.com>
Thu, 21 Feb 2008 19:10:38 +0000 (11:10 -0800)
debian/control
setup.py

index 8f97946ca328c4547116a3a12fefebe23664f721..b10043f1e3ef1799b24e5db620ded3259940271c 100644 (file)
@@ -5,7 +5,7 @@ Maintainer: Cameron Dale <camrdale@gmail.com>
 Homepage: http://www.camrdale.org/apt-dht.html
 Standards-Version: 3.7.3
 Build-Depends: debhelper (>= 5.0.37.2)
-Build-Depends-Indep: python-dev, python-support (>= 0.5.4), docbook-to-man
+Build-Depends-Indep: python-dev, python-support (>= 0.5.4), docbook-to-man, python-debian (>= 0.1.4)
 Vcs-Git: git://git.camrdale.org/git/apt-dht.git
 Vcs-Browser: http://git.camrdale.org/?p=apt-dht.git;a=summary
 XS-Dm-Upload-Allowed: yes
index 362d38ece2176608f4662c415d236a1046248a12..664f390e950707dacbed81ff7de6f87a84fa9e7a 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -3,9 +3,17 @@
 import sys
 from distutils.core import setup
 
+from debian_bundle import changelog
+
+f = open('debian/changelog')
+data = f.read()
+f.close()
+c = changelog.Changelog(file=data, max_blocks=1)
+del data
+
 setup(
     name = "apt-dht",
-    version = "0.0.0",
+    version = c.full_version,
     author = "Cameron Dale",
     author_email = "<camrdale@gmail.com>",
     url = "http://www.camrdale.org/apt-dht.html",