Index: trunk/packages/invirt-base/debian/changelog
===================================================================
--- trunk/packages/invirt-base/debian/changelog	(revision 1592)
+++ trunk/packages/invirt-base/debian/changelog	(revision 1597)
@@ -1,2 +1,8 @@
+invirt-base (0.0.7) unstable; urgency=low
+
+  * Move invirt.remote module to invirt-remote-server package
+
+ -- Evan Broder <broder@mit.edu>  Mon, 10 Nov 2008 15:15:29 -0500
+
 invirt-base (0.0.6) unstable; urgency=low
 
Index: trunk/packages/invirt-base/python/invirt/remote.py
===================================================================
--- trunk/packages/invirt-base/python/invirt/remote.py	(revision 1592)
+++ 	(revision )
@@ -1,19 +1,0 @@
-from subprocess import PIPE, Popen
-from invirt.config import structs as config
-import yaml
-
-def bcast(cmd, hosts = [h.hostname for h in config.hosts]):
-    """
-    Given a command and a list of hostnames or IPs, issue the command to all
-    the nodes and return a list of (host, output) pairs (the order should be
-    the same as the order of the hosts).
-    """
-    pipes = [(host,
-              Popen(['remctl', host, 'remote', 'web', cmd], stdout=PIPE))
-             for host in hosts]
-    outputs = [(s, p.communicate()[0]) for (s, p) in pipes]
-    for (s, p) in pipes:
-        if p.returncode != 0:
-            raise RuntimeError("remctl to host %s returned non-zero exit status %d"
-                               % (s, p.returncode))
-    return [(s, yaml.load(o, yaml.CSafeLoader)) for (s, o) in outputs]
Index: trunk/packages/invirt-remote-server/debian/changelog
===================================================================
--- trunk/packages/invirt-remote-server/debian/changelog	(revision 1592)
+++ trunk/packages/invirt-remote-server/debian/changelog	(revision 1597)
@@ -1,2 +1,8 @@
+invirt-remote-server (0.0.15) unstable; urgency=low
+
+  * Include invirt.remote Python module
+
+ -- Evan Broder <broder@mit.edu>  Mon, 10 Nov 2008 15:15:13 -0500
+
 invirt-remote-server (0.0.14) unstable; urgency=low
 
Index: trunk/packages/invirt-remote-server/debian/control
===================================================================
--- trunk/packages/invirt-remote-server/debian/control	(revision 1592)
+++ trunk/packages/invirt-remote-server/debian/control	(revision 1597)
@@ -2,16 +2,19 @@
 Section: servers
 Priority: important
-Maintainer: invirt@mit.edu
-Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5)
-Standards-Version: 3.7.2
+Maintainer: Invirt project <invirt@mit.edu>
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5),
+ python-all-dev (>=2.3.5-11), python-support (>= 0.5.3),
+ python-setuptools, python-debian, python-apt
+Standards-Version: 3.8.0
 
 Package: invirt-remote-server
 Architecture: all
-Provides: ${diverted-files}
+Provides: ${diverted-files}, ${python:Provides}
 Conflicts: ${diverted-files}
-Depends: ${shlibs:Depends}, ${misc:Depends}, daemon,
- debathena-kerberos-config, fuse-utils, openssh-server,
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends},
+ daemon, debathena-kerberos-config, fuse-utils, openssh-server,
  python-routefs, invirt-database, invirt-base, remctl-server,
  remctl-client
+XB-Python-Version: ${python:Versions}
 Description: Invirt remote-control server
  This package should be installed to set up the remote-control server.
Index: trunk/packages/invirt-remote-server/debian/pycompat
===================================================================
--- trunk/packages/invirt-remote-server/debian/pycompat	(revision 1597)
+++ trunk/packages/invirt-remote-server/debian/pycompat	(revision 1597)
@@ -0,0 +1,1 @@
+2
Index: trunk/packages/invirt-remote-server/debian/rules
===================================================================
--- trunk/packages/invirt-remote-server/debian/rules	(revision 1592)
+++ trunk/packages/invirt-remote-server/debian/rules	(revision 1597)
@@ -1,3 +1,9 @@
 #!/usr/bin/make -f
 
+DEB_PYTHON_SYSTEM=pysupport
+
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
+
+clean::
+	rm -rf invirt.remote.egg-info
Index: trunk/packages/invirt-remote-server/python/remote/__init__.py
===================================================================
--- trunk/packages/invirt-remote-server/python/remote/__init__.py	(revision 1597)
+++ trunk/packages/invirt-remote-server/python/remote/__init__.py	(revision 1597)
@@ -0,0 +1,1 @@
+from bcast import bcast
Index: trunk/packages/invirt-remote-server/python/remote/bcast.py
===================================================================
--- trunk/packages/invirt-remote-server/python/remote/bcast.py	(revision 1597)
+++ trunk/packages/invirt-remote-server/python/remote/bcast.py	(revision 1597)
@@ -0,0 +1,19 @@
+from subprocess import PIPE, Popen
+from invirt.config import structs as config
+import yaml
+
+def bcast(cmd, hosts = [h.hostname for h in config.hosts]):
+    """
+    Given a command and a list of hostnames or IPs, issue the command to all
+    the nodes and return a list of (host, output) pairs (the order should be
+    the same as the order of the hosts).
+    """
+    pipes = [(host,
+              Popen(['remctl', host, 'remote', 'web', cmd], stdout=PIPE))
+             for host in hosts]
+    outputs = [(s, p.communicate()[0]) for (s, p) in pipes]
+    for (s, p) in pipes:
+        if p.returncode != 0:
+            raise RuntimeError("remctl to host %s returned non-zero exit status %d"
+                               % (s, p.returncode))
+    return [(s, yaml.load(o, yaml.CSafeLoader)) for (s, o) in outputs]
Index: trunk/packages/invirt-remote-server/setup.py
===================================================================
--- trunk/packages/invirt-remote-server/setup.py	(revision 1597)
+++ trunk/packages/invirt-remote-server/setup.py	(revision 1597)
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+from os import path
+from debian_bundle.changelog import Changelog
+from debian_bundle.deb822 import Deb822
+from email.utils import parseaddr
+from setuptools import setup
+
+version = Changelog(open(path.join(path.dirname(__file__), 'debian/changelog')).read()).\
+    get_version().full_version
+
+maintainer_full = Deb822(open(path.join(path.dirname(__file__), 'debian/control')))['Maintainer']
+maintainer, maintainer_email = parseaddr(maintainer_full)
+
+setup(
+    name='invirt.remote',
+    version=version,
+    maintainer=maintainer,
+    maintainer_email=maintainer_email,
+    
+    packages = ['invirt.remote'],
+    package_dir = {'invirt': 'python'}
+)
