Make windows users happy (hopefully)

This commit is contained in:
Mug 2023-04-10 17:12:25 +02:00
parent cf339c9b3c
commit ee71ce8ab7

View file

@ -27,7 +27,9 @@ def _load_shared_library(lib_base_name):
if ("LLAMA_LIB" in os.environ):
lib_base_name = os.environ["LLAMA_LIB"]
_lib_paths = [pathlib.Path(os.environ["LLAMA_LIB"]).resolve()]
_lib = pathlib.Path(lib_base_name)
_base_path = _lib.parent.resolve()
_lib_paths = [_lib.resolve()]
# Add the library directory to the DLL search path on Windows (if needed)
if sys.platform == "win32" and sys.version_info >= (3, 8):