Switch sipb-xen-base to build using a setup.py script
authorEvan Broder <broder@mit.edu>
Fri, 24 Oct 2008 09:23:54 +0000 (05:23 -0400)
committerEvan Broder <broder@mit.edu>
Fri, 24 Oct 2008 09:23:54 +0000 (05:23 -0400)
svn path=/trunk/packages/sipb-xen-base/; revision=1206

debian/changelog
debian/rules
python/invirt/__init__.py [moved from files/usr/share/python-support/sipb-xen-base/invirt/__init__.py with 100% similarity]
python/invirt/common.py [moved from files/usr/share/python-support/sipb-xen-base/invirt/common.py with 100% similarity]
python/invirt/config.py [moved from files/usr/share/python-support/sipb-xen-base/invirt/config.py with 100% similarity]
python/invirt/remote.py [moved from files/usr/share/python-support/sipb-xen-base/invirt/remote.py with 100% similarity]
scripts/invirt-getconf [moved from files/usr/bin/invirt-getconf with 100% similarity]
scripts/invirt-reload [moved from files/usr/sbin/invirt-reload with 100% similarity]
setup.py [new file with mode: 0755]

index 5391977..11de8fc 100644 (file)
@@ -1,3 +1,9 @@
+sipb-xen-base (8.24) unstable; urgency=low
+
+  * Switch to using a setup.py file with CDBS's Python support
+
+ -- Evan Broder <broder@mit.edu>  Fri, 24 Oct 2008 05:22:49 -0400
+
 sipb-xen-base (8.23) unstable; urgency=low
 
   * Now that we're using Python 2.5, we can actually write with statements
 sipb-xen-base (8.23) unstable; urgency=low
 
   * Now that we're using Python 2.5, we can actually write with statements
index 6a0e7d7..e4cfb59 100755 (executable)
@@ -1,7 +1,9 @@
 #!/usr/bin/make -f
 
 #!/usr/bin/make -f
 
+DEB_PYTHON_SYSTEM=pysupport
+
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
 
 
-# do we, should we, care between pysupport and pycentral?
-binary-install/sipb-xen-base::
-       dh_pysupport -psipb-xen-base
+clean::
+       rm -rf invirt.egg-info
diff --git a/setup.py b/setup.py
new file mode 100755 (executable)
index 0000000..8f97297
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+import os
+from debian_bundle.changelog import Changelog
+from debian_bundle.deb822 import Deb822
+from email.utils import parseaddr
+from setuptools import setup
+
+version = Changelog(open(os.path.join(__file__, 'debian/changelog')).read()).\
+    get_version().full_version
+
+maintainer_full = Deb822(open(os.path.join(__file__, 'debian/control')))['Maintainer']
+maintainer, maintainer_email = parseaddr(maintainer_full)
+
+setup(
+    name='invirt',
+    version=version,
+    maintainer=maintainer,
+    maintainer_email=maintainer_full,
+    
+    package_dir = {'': 'python'},
+    scripts=['scripts/invirt-getconf', 'scripts/invirt-reload']
+)