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).
This commit is contained in:
parent
39a1f1462b
commit
61a7420c94
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user