diff options
| author | Yaguang Tang <heut2008@gmail.com> | 2012-11-03 18:15:55 +0800 |
|---|---|---|
| committer | Yaguang Tang <heut2008@gmail.com> | 2012-11-03 18:18:13 +0800 |
| commit | 18d138c1ec2d028981a64142d61d212c9fe8da52 (patch) | |
| tree | 271beaa9146249deb2b5da9a87988f2ed3c2d562 /openstack | |
| parent | 0131c98be790d76770e877ee2c28b887fb05a808 (diff) | |
| download | oslo-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.py | 8 |
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 |
