setup.py
changeset 32886 19b0fd4b5570
parent 32782 9a4adc76c88a
child 32890 20fc5d39d0c1
equal deleted inserted replaced
32885:8e02829bec61 32886:19b0fd4b5570
   141     from distutils.core import Distribution
   141     from distutils.core import Distribution
   142 except ImportError:
   142 except ImportError:
   143     py2exeloaded = False
   143     py2exeloaded = False
   144 
   144 
   145 def runcmd(cmd, env):
   145 def runcmd(cmd, env):
   146     if (sys.platform == 'plan9'
   146     p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
   147        and (sys.version_info[0] == 2 and sys.version_info[1] < 7)):
   147                          stderr=subprocess.PIPE, env=env)
   148         # subprocess kludge to work around issues in half-baked Python
   148     out, err = p.communicate()
   149         # ports, notably bichued/python:
   149     return out, err
   150         _, out, err = os.popen3(cmd)
       
   151         return str(out), str(err)
       
   152     else:
       
   153         p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
       
   154                              stderr=subprocess.PIPE, env=env)
       
   155         out, err = p.communicate()
       
   156         return out, err
       
   157 
   150 
   158 def runhg(cmd, env):
   151 def runhg(cmd, env):
   159     out, err = runcmd(cmd, env)
   152     out, err = runcmd(cmd, env)
   160     # If root is executing setup.py, but the repository is owned by
   153     # If root is executing setup.py, but the repository is owned by
   161     # another user (as in "sudo python setup.py install") we will get
   154     # another user (as in "sudo python setup.py install") we will get