summaryrefslogtreecommitdiffstats
path: root/SCons/Tool
diff options
context:
space:
mode:
authorJoseph Brill <48932340+jcbrill@users.noreply.github.com>2022-06-27 19:09:13 (GMT)
committerJoseph Brill <48932340+jcbrill@users.noreply.github.com>2022-06-27 19:09:13 (GMT)
commit90922c1195eef8d75664d59ed8668fd8e5679390 (patch)
tree52d932864385af4c62ed9e4dbe8aeb6640a8b834 /SCons/Tool
parentb94e801aba5a6864644a156b5260ce6d721f4fc3 (diff)
downloadSCons-90922c1195eef8d75664d59ed8668fd8e5679390.zip
SCons-90922c1195eef8d75664d59ed8668fd8e5679390.tar.gz
SCons-90922c1195eef8d75664d59ed8668fd8e5679390.tar.bz2
Add docstrings to MSVC/Util.py methods.
Diffstat (limited to 'SCons/Tool')
-rw-r--r--SCons/Tool/MSCommon/MSVC/Util.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/SCons/Tool/MSCommon/MSVC/Util.py b/SCons/Tool/MSCommon/MSVC/Util.py
index 15abdcd..ba70b24 100644
--- a/SCons/Tool/MSCommon/MSVC/Util.py
+++ b/SCons/Tool/MSCommon/MSVC/Util.py
@@ -29,6 +29,16 @@ import os
import re
def listdir_dirs(p):
+ """Get a list of qualified subdirectory paths from a windows path.
+
+ Args:
+ p: str
+ windows path
+
+ Returns:
+ List[str]: list of qualified subdirectory paths
+
+ """
dirs = []
for dir_name in os.listdir(p):
dir_path = os.path.join(p, dir_name)
@@ -37,6 +47,16 @@ def listdir_dirs(p):
return dirs
def process_path(p):
+ """Normalize a windows path.
+
+ Args:
+ p: str
+ windows path
+
+ Returns:
+ str: normalized windows path
+
+ """
if p:
p = os.path.normpath(p)
p = os.path.realpath(p)
@@ -46,6 +66,16 @@ def process_path(p):
re_version_prefix = re.compile(r'^(?P<version>[0-9.]+).*')
def get_version_prefix(version):
+ """Get the version number prefix from a string.
+
+ Args:
+ version: str
+ version string
+
+ Returns:
+ str: the version number prefix
+
+ """
m = re_version_prefix.match(version)
if m:
rval = m.group('version')