Correct OS arch within Cygwin emu

This commit is contained in:
Ivan Kravets
2015-09-10 19:47:14 +03:00
parent 4338bade5b
commit 50984f1475

View File

@ -113,12 +113,18 @@ def singleton(cls):
def get_systype(): def get_systype():
data = uname() data = uname()
systype = data[0] type_ = data[0].lower()
if "cygwin" in systype.lower(): arch = data[4].lower() if data[4] else ""
systype = "windows"
if data[4]: # use native Windows binaries for Cygwin
systype += "_" + data[4] if "cygwin" in type_:
return systype.lower() if arch == "i686":
arch = "x86"
elif arch == "x86_64":
arch = "amd64"
type_ = "windows"
return "%s_%s" % (type_, arch) if arch else type_
def pioversion_to_intstr(): def pioversion_to_intstr():