summaryrefslogtreecommitdiffstats
path: root/openstack
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
commit18d138c1ec2d028981a64142d61d212c9fe8da52 (patch)
tree271beaa9146249deb2b5da9a87988f2ed3c2d562 /openstack
parent0131c98be790d76770e877ee2c28b887fb05a808 (diff)
downloadoslo-18d138c1ec2d028981a64142d61d212c9fe8da52.tar.gz
oslo-18d138c1ec2d028981a64142d61d212c9fe8da52.tar.xz
oslo-18d138c1ec2d028981a64142d61d212c9fe8da52.zip
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 'openstack')
-rw-r--r--openstack/common/setup.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/openstack/common/setup.py b/openstack/common/setup.py
index 83eef07..e6f72f0 100644
--- a/openstack/common/setup.py
+++ b/openstack/common/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