Revert "Windows: add win-sdk/wgl externals during bootstrapping (#43459)" (#43819)

This reverts commit 9e2558bd56.
This commit is contained in:
John W. Parent 2024-04-24 12:24:28 -04:00 committed by GitHub
parent e8b76c27e4
commit 641ab95a31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 40 deletions

View file

@ -1572,8 +1572,6 @@ Microsoft Visual Studio
""""""""""""""""""""""" """""""""""""""""""""""
Microsoft Visual Studio provides the only Windows C/C++ compiler that is currently supported by Spack. Microsoft Visual Studio provides the only Windows C/C++ compiler that is currently supported by Spack.
Spack additionally requires that the Windows SDK (including WGL) to be installed as part of your
visual studio installation as it is required to build many packages from source.
We require several specific components to be included in the Visual Studio installation. We require several specific components to be included in the Visual Studio installation.
One is the C/C++ toolset, which can be selected as "Desktop development with C++" or "C++ build tools," One is the C/C++ toolset, which can be selected as "Desktop development with C++" or "C++ build tools,"
@ -1581,7 +1579,6 @@ depending on installation type (Professional, Build Tools, etc.) The other requ
"C++ CMake tools for Windows," which can be selected from among the optional packages. "C++ CMake tools for Windows," which can be selected from among the optional packages.
This provides CMake and Ninja for use during Spack configuration. This provides CMake and Ninja for use during Spack configuration.
If you already have Visual Studio installed, you can make sure these components are installed by If you already have Visual Studio installed, you can make sure these components are installed by
rerunning the installer. Next to your installation, select "Modify" and look at the rerunning the installer. Next to your installation, select "Modify" and look at the
"Installation details" pane on the right. "Installation details" pane on the right.

View file

@ -538,49 +538,12 @@ def ensure_patchelf_in_path_or_raise() -> spack.util.executable.Executable:
) )
def ensure_winsdk_external_or_raise() -> None:
"""Ensure the Windows SDK + WGL are available on system
If both of these package are found, the Spack user or bootstrap
configuration (depending on where Spack is running)
will be updated to include all versions and variants detected.
If either the WDK or WSDK are not found, this method will raise
a RuntimeError.
**NOTE:** This modifies the Spack config in the current scope,
either user or environment depending on the calling context.
This is different from all other current bootstrap dependency
checks.
"""
if set(["win-sdk", "wgl"]).issubset(spack.config.get("packages").keys()):
return
externals = spack.detection.by_path(["win-sdk", "wgl"])
if not set(["win-sdk", "wgl"]) == externals.keys():
missing_packages_lst = []
if "wgl" not in externals:
missing_packages_lst.append("wgl")
if "win-sdk" not in externals:
missing_packages_lst.append("win-sdk")
missing_packages = " & ".join(missing_packages_lst)
raise RuntimeError(
f"Unable to find the {missing_packages}, please install these packages\
via the Visual Studio installer\
before proceeding with Spack or provide the path to a non standard install via\
'spack external find --path'"
)
# wgl/sdk are not required for bootstrapping Spack, but
# are required for building anything non trivial
# add to user config so they can be used by subsequent Spack ops
spack.detection.update_configuration(externals, buildable=False)
def ensure_core_dependencies() -> None: def ensure_core_dependencies() -> None:
"""Ensure the presence of all the core dependencies.""" """Ensure the presence of all the core dependencies."""
if sys.platform.lower() == "linux": if sys.platform.lower() == "linux":
ensure_patchelf_in_path_or_raise() ensure_patchelf_in_path_or_raise()
if not IS_WINDOWS: if not IS_WINDOWS:
ensure_gpg_in_path_or_raise() ensure_gpg_in_path_or_raise()
else:
ensure_winsdk_external_or_raise()
ensure_clingo_importable_or_raise() ensure_clingo_importable_or_raise()