summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Smillie <83249606+jamessmillie@users.noreply.github.com>2023-12-03 16:35:13 -0700
committerGitHub <noreply@github.com>2023-12-03 15:35:13 -0800
commit9e0720207afb5b0fed4035dc1dbf214a1eddfca1 (patch)
treeeb8c0624ad8c9c6aabefc5a4cfbb543431df5c2b /lib
parent88e738c34346031ce875fdd510dd2251aa63dad7 (diff)
downloadspack-9e0720207afb5b0fed4035dc1dbf214a1eddfca1.tar.gz
spack-9e0720207afb5b0fed4035dc1dbf214a1eddfca1.tar.bz2
spack-9e0720207afb5b0fed4035dc1dbf214a1eddfca1.tar.xz
spack-9e0720207afb5b0fed4035dc1dbf214a1eddfca1.zip
Windows: fix kit base path and reference to windows registry key (#41388)
* Proper handling of argument passed as semicolon-separated str * Fix reference to windows registry key in win-wdk
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/detection/common.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/spack/spack/detection/common.py b/lib/spack/spack/detection/common.py
index 6fba021b33..b8da6d9a20 100644
--- a/lib/spack/spack/detection/common.py
+++ b/lib/spack/spack/detection/common.py
@@ -309,10 +309,14 @@ class WindowsKitExternalPaths:
return glob.glob(kit_base)
@staticmethod
- def find_windows_kit_bin_paths(kit_base: Optional[str] = None) -> List[str]:
+ def find_windows_kit_bin_paths(
+ kit_base: Union[Optional[str], Optional[list]] = None
+ ) -> List[str]:
"""Returns Windows kit bin directory per version"""
kit_base = WindowsKitExternalPaths.find_windows_kit_roots() if not kit_base else kit_base
assert kit_base, "Unexpectedly empty value for Windows kit base path"
+ if isinstance(kit_base, str):
+ kit_base = kit_base.split(";")
kit_paths = []
for kit in kit_base:
kit_bin = os.path.join(kit, "bin")
@@ -320,10 +324,14 @@ class WindowsKitExternalPaths:
return kit_paths
@staticmethod
- def find_windows_kit_lib_paths(kit_base: Optional[str] = None) -> List[str]:
+ def find_windows_kit_lib_paths(
+ kit_base: Union[Optional[str], Optional[list]] = None
+ ) -> List[str]:
"""Returns Windows kit lib directory per version"""
kit_base = WindowsKitExternalPaths.find_windows_kit_roots() if not kit_base else kit_base
assert kit_base, "Unexpectedly empty value for Windows kit base path"
+ if isinstance(kit_base, str):
+ kit_base = kit_base.split(";")
kit_paths = []
for kit in kit_base:
kit_lib = os.path.join(kit, "Lib")