File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232# TLS_PARAMETERS. These are required to build Windows Binaries with TLS 1.3 support.
3333WINDOWS_SDK_MIN_VERSION_TLS1_3_SUPPORT = "10.0.17763.0"
3434
35+ # Regex to match a Windows SDK version directory name in the format of major.minor.build.revision
36+ SDK_VERSION_RE = re .compile (r'^(\d+)\.(\d+)\.(\d+)\.(\d+)$' )
37+
3538
3639def parse_version (version_string ):
3740 return tuple (int (x ) for x in version_string .split ("." ))
@@ -123,8 +126,8 @@ def get_windows_sdk_versions():
123126 if os .path .exists (sdk_path ):
124127 try :
125128 for entry in os .listdir (sdk_path ):
126- # SDK version directories look like "10.0.17763.0"
127- if entry . startswith ( '10.0.' ) and os .path .isdir (os .path .join (sdk_path , entry )):
129+ # SDK version directories look like "major.minor.build.revision" (e.g. " 10.0.17763.0")
130+ if SDK_VERSION_RE . match ( entry ) and os .path .isdir (os .path .join (sdk_path , entry )):
128131 if entry not in sdk_versions :
129132 sdk_versions .append (entry )
130133 except OSError :
You can’t perform that action at this time.
0 commit comments