setup.py won't run on Windows

Fixed an issue where setup.py will not run at all in Windows due to
the script attempting to invoke `os.uname()` which isn't supported on
Windows.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
This commit is contained in:
Sergey Kizunov 2016-02-05 14:41:36 -06:00
parent afca3d6733
commit b10ef84279

View file

@ -61,7 +61,11 @@ BOOTSTRAP_SCRIPT_DISTRIBUTED_VERSION = os.environ.get(
# Store a reference to the executing platform
IS_WINDOWS_PLATFORM = sys.platform.startswith('win')
IS_SMARTOS_PLATFORM = os.uname()[0] == 'SunOS' and os.uname()[3].startswith('joyent_')
if IS_WINDOWS_PLATFORM:
IS_SMARTOS_PLATFORM = False
else:
# os.uname() not available on Windows.
IS_SMARTOS_PLATFORM = os.uname()[0] == 'SunOS' and os.uname()[3].startswith('joyent_')
# Store a reference wether if we're running under Python 3 and above
IS_PY3 = sys.version_info > (3,)