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: I34f58ea09317c0be6ac23c5d9591bc83bc78782b
This commit is contained in:
Alessandro Pilotti 2012-09-18 00:05:27 +03:00
parent 55dd9aeb63
commit bfb0f70f40
1 changed files with 6 additions and 2 deletions

View File

@ -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