Skip to content

Commit

Permalink
Revert "Use add_dll_directory"
Browse files Browse the repository at this point in the history
This reverts commit caf8cbb.
  • Loading branch information
paddyroddy committed Mar 17, 2023
1 parent 0693ae6 commit 1b2569d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions btrack/libwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]

Expand All @@ -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
Expand Down

0 comments on commit 1b2569d

Please sign in to comment.