setup.py: Basic support for windows.
During setup, some commands (git describe mainly) are launched, and fail under Windows since /bin/sh is not available. By switching to cmd to execute commands when python says that the os is 'nt', setup.py works under both Linux and Windows. I have used that patch for some time now, and haven't found other issues yet. Change-Id: Ib4c0ec53765ae80fc6b63c34a926644427a9ebce Reviewed-on: https://review.openstack.org/33368 Reviewed-by: Antoine Musso <hashar@free.fr> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Monty Taylor <mordred@inaugust.com> Approved: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
This commit is contained in:
parent
79d7d5e64b
commit
8e6b9e900d
@ -117,7 +117,12 @@ def write_requirements():
|
||||
|
||||
|
||||
def _run_shell_command(cmd):
|
||||
output = subprocess.Popen(["/bin/sh", "-c", cmd],
|
||||
if os.name == 'nt':
|
||||
params = ["cmd", "/C"]
|
||||
else:
|
||||
params = ["/bin/sh", "-c"]
|
||||
params.append(cmd)
|
||||
output = subprocess.Popen(params,
|
||||
stdout=subprocess.PIPE)
|
||||
out = output.communicate()
|
||||
if len(out) == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user