"""
import sys
import os
+import popen2
import urllib
import urllib2
import urlparse
output.write("+ %s\n" % cmd)
if NO_EXECUTE:
return 0
- dummy, fp = os.popen4(cmd, "r")
- dummy.close()
+ child = popen2.Popen4(cmd)
+ child.tochild.close()
while 1:
- line = fp.readline()
+ line = child.fromchild.readline()
if not line:
break
if output:
output.write(line)
- rv = fp.close()
- return rv
+ return child.wait()
def downloadPackageOnly(self, output=None):
"""Download a single package, if needed.
if not installcmd:
installcmd = '"%s" setup.py install' % sys.executable
if self._cmd(output, self._buildDirname, installcmd):
- return "install %s: running \"%s\" failed" % self.fullname()
+ return "install %s: running \"%s\" failed" % \
+ (self.fullname(), installcmd)
self.afterInstall()