From 7d195b67f954ab1391b0f5233a85dbcaed1aab85 Mon Sep 17 00:00:00 2001 From: Joseph Brill <48932340+jcbrill@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:49:39 -0400 Subject: Convert SortOrder class to enum --- SCons/Tool/MSCommon/vc.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SCons/Tool/MSCommon/vc.py b/SCons/Tool/MSCommon/vc.py index 7c4228d..d078a99 100644 --- a/SCons/Tool/MSCommon/vc.py +++ b/SCons/Tool/MSCommon/vc.py @@ -51,6 +51,7 @@ from collections import ( namedtuple, OrderedDict, ) +import enum import SCons.Util import SCons.Warnings @@ -1640,13 +1641,14 @@ class _MSVCScriptArguments: # MSVC_TOOLSET_VERSION: VS2017+ # MSVC_SPECTRE_LIBS: VS2017+ - class SortOrder: - ARCH = 0 # arch - UWP = 1 # MSVC_UWP_APP - SDK = 2 # MSVC_SDK_VERSION + @enum.unique + class SortOrder(enum.IntEnum): + ARCH = 0 # arch + UWP = 1 # MSVC_UWP_APP + SDK = 2 # MSVC_SDK_VERSION TOOLSET = 3 # MSVC_TOOLSET_VERSION SPECTRE = 4 # MSVC_SPECTRE_LIBS - USER = 5 # MSVC_SCRIPT_ARGS + USER = 5 # MSVC_SCRIPT_ARGS VS2019 = _Const.MSVS_VERSION_INTERNAL['2019'] VS2017 = _Const.MSVS_VERSION_INTERNAL['2017'] -- cgit v0.12