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:
parent
55dd9aeb63
commit
bfb0f70f40
@ -117,8 +117,12 @@ def write_requirements():
|
|||||||
|
|
||||||
|
|
||||||
def _run_shell_command(cmd):
|
def _run_shell_command(cmd):
|
||||||
output = subprocess.Popen(["/bin/sh", "-c", cmd],
|
if os.name == 'nt':
|
||||||
stdout=subprocess.PIPE)
|
output = subprocess.Popen(["cmd.exe", "/C", cmd],
|
||||||
|
stdout=subprocess.PIPE)
|
||||||
|
else:
|
||||||
|
output = subprocess.Popen(["/bin/sh", "-c", cmd],
|
||||||
|
stdout=subprocess.PIPE)
|
||||||
out = output.communicate()
|
out = output.communicate()
|
||||||
if len(out) == 0:
|
if len(out) == 0:
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user