setup.py
changeset 16383 f5dd179bfa4a
parent 16209 5536770b3c88
child 16683 525fdb738975
--- a/setup.py	Sun Apr 08 22:17:51 2012 -0500
+++ b/setup.py	Sun Apr 08 12:43:41 2012 -0700
@@ -127,10 +127,16 @@
     py2exeloaded = False
 
 def runcmd(cmd, env):
-    p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
-                         stderr=subprocess.PIPE, env=env)
-    out, err = p.communicate()
-    return out, err
+    if sys.platform == 'plan9':
+        # subprocess kludge to work around issues in half-baked Python
+        # ports, notably bichued/python:
+        _, out, err = os.popen3(cmd)
+        return str(out), str(err)
+    else:
+        p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+                             stderr=subprocess.PIPE, env=env)
+        out, err = p.communicate()
+        return out, err
 
 def runhg(cmd, env):
     out, err = runcmd(cmd, env)