Fixes setup compatibility issue on Windows
Fixes Bug #1052161 "python setup.py build" fails on Windows due to a hardcoded shell path: /bin/sh Change-Id: I9b5838aa96d3f41f8baf58f28d3e9e6d9646f6cb
This commit is contained in:
@@ -116,8 +116,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
|
||||
|
Reference in New Issue
Block a user