summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorYaguang Tang <heut2008@gmail.com>2012-11-03 18:15:55 +0800
committerYaguang Tang <heut2008@gmail.com>2012-11-03 18:18:13 +0800
commit3587e1d175f2f3a60f5618671f9a4d80f8689f3b (patch)
tree7e30145dbc4c2ceffad70c749bf4713f5b31341f /setup.py
parent441afb006b428e7d40c38f75ade7d6726d5213a0 (diff)
downloadpbr-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.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 83eef07..e6f72f0 100644
--- a/setup.py
+++ b/setup.py
@@ -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