From 61a7420c94d84888a5408bf88f74076dfc1014fe Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:04:57 -0500 Subject: Windows bootstrapping: remove unneeded call to add dll to PATH (#33622) #32942 fixed bootstrapping on Windows by having the core Spack code explicitly add the Clingo package bin/ directory as a DLL path. Since then, #33400 has been merged, which ensures that the Python module installed by the Spack `clingo` package can find the DLLs in bin/. Note that this only works for Spack instances which have been bootstrapped after #33400: for installations bootstrapped before then, you will need to run `spack clean -b` (this would only be needed for Spack instances running on Windows). --- lib/spack/spack/bootstrap.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/spack/spack/bootstrap.py b/lib/spack/spack/bootstrap.py index e92a1fb6a1..18815a0d51 100644 --- a/lib/spack/spack/bootstrap.py +++ b/lib/spack/spack/bootstrap.py @@ -90,13 +90,6 @@ def _try_import_from_store(module, query_spec, query_info=None): ] # type: list[str] path_before = list(sys.path) - # Python 3.8+ on Windows does not search dependent DLLs in PATH, - # so we need to manually add it using os.add_dll_directory - # https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew - if sys.version_info[:2] >= (3, 8) and sys.platform == "win32": - if os.path.isdir(candidate_spec.prefix.bin): - os.add_dll_directory(candidate_spec.prefix.bin) # novermin - # NOTE: try module_paths first and last, last allows an existing version in path # to be picked up and used, possibly depending on something in the store, first # allows the bootstrap version to work when an incompatible version is in -- cgit v1.2.3-70-g09d2