Mercurial > hgsubversion
comparison setup.py @ 799:0b56b1492d23
Fix setup.py calls to hg.bat on Windows
| author | Patrick Mezard <pmezard@gmail.com> |
|---|---|
| date | Sat, 16 Apr 2011 17:46:38 +0200 |
| parents | 3bffdf0e5948 |
| children | 076ded084655 |
comparison
equal
deleted
inserted
replaced
| 798:3bffdf0e5948 | 799:0b56b1492d23 |
|---|---|
| 16 from setuptools import setup | 16 from setuptools import setup |
| 17 except ImportError: | 17 except ImportError: |
| 18 from distutils.core import setup | 18 from distutils.core import setup |
| 19 | 19 |
| 20 def runcmd(cmd, env): | 20 def runcmd(cmd, env): |
| 21 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, | 21 shell = os.name == 'nt' |
| 22 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=shell, | |
| 22 stderr=subprocess.PIPE, env=env) | 23 stderr=subprocess.PIPE, env=env) |
| 23 out, err = p.communicate() | 24 out, err = p.communicate() |
| 24 # If root is executing setup.py, but the repository is owned by | 25 # If root is executing setup.py, but the repository is owned by |
| 25 # another user (as in "sudo python setup.py install") we will get | 26 # another user (as in "sudo python setup.py install") we will get |
| 26 # trust warnings since the .hg/hgrc file is untrusted. That is | 27 # trust warnings since the .hg/hgrc file is untrusted. That is |
