diff options
author | Yaguang Tang <heut2008@gmail.com> | 2012-11-03 18:15:55 +0800 |
---|---|---|
committer | Yaguang Tang <heut2008@gmail.com> | 2012-11-03 18:18:13 +0800 |
commit | 3587e1d175f2f3a60f5618671f9a4d80f8689f3b (patch) | |
tree | 7e30145dbc4c2ceffad70c749bf4713f5b31341f /setup.py | |
parent | 441afb006b428e7d40c38f75ade7d6726d5213a0 (diff) | |
download | pbr-3587e1d175f2f3a60f5618671f9a4d80f8689f3b.tar.gz |
Fixes setup compatibility issue on Windows
Fixes Bug #1052161
"python setup.py build" fails on Windows due to a hardcoded shell path:
/bib/sh.
Change-Id: Iee0a1fcbdabfd469e92fa73002763d419e75ec27
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -117,8 +117,12 @@ def write_requirements(): def _run_shell_command(cmd): - output = subprocess.Popen(["/bin/sh", "-c", cmd], - stdout=subprocess.PIPE) + if os.name == 'nt': + output = subprocess.Popen(["cmd.exe", "/C", cmd], + stdout=subprocess.PIPE) + else: + output = subprocess.Popen(["/bin/sh", "-c", cmd], + stdout=subprocess.PIPE) out = output.communicate() if len(out) == 0: return None |