mirror of
https://github.com/saltstack/salt.git
synced 2025-04-15 09:10:20 +00:00
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:
parent
afca3d6733
commit
b10ef84279
1 changed files with 5 additions and 1 deletions
6
setup.py
6
setup.py
|
@ -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,)
|
||||
|
|
Loading…
Add table
Reference in a new issue