From 1b2569d0b3ceb01af7a586b165229b1afa5a4e46 Mon Sep 17 00:00:00 2001 From: Paddy Roddy Date: Fri, 17 Mar 2023 16:15:59 +0000 Subject: [PATCH] Revert "Use add_dll_directory" This reverts commit caf8cbb00247c9d565d98f84a4edcbc1da88761a. --- btrack/libwrapper.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/btrack/libwrapper.py b/btrack/libwrapper.py index a1ebd1a6..2e0e1e2a 100644 --- a/btrack/libwrapper.py +++ b/btrack/libwrapper.py @@ -6,7 +6,6 @@ import numpy as np from .btypes import PyTrackingInfo, PyTrackObject -from .constants import BTRACK_PATH from .optimise import hypothesis # get the logger instance @@ -77,9 +76,6 @@ def load_library(filename): system = platform.system() - if system == "Windows": - os.add_dll_directory(os.path.join(BTRACK_PATH, "libs", "libtracker")) - file_ext = {"Linux": ".so", "Darwin": ".dylib", "Windows": ".DLL"} full_lib_file = lib_file + file_ext[system] @@ -94,7 +90,7 @@ def load_library(filename): def get_library(): # noqa: PLR0915 """Loads and returns the btrack shared library.""" - lib = load_library(os.path.join(BTRACK_PATH, "libs", "libtracker")) + lib = load_library("libtracker") # deal with constructors/destructors lib.new_interface.restype = ctypes.c_void_p