From 5173f55d57a944c4f6a3e018892fc1da55e15571 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 23 Dec 2024 02:15:31 -0500 Subject: Correctly pass arguments to Python's ctypes find_library() function The prefix "lib" should not be included, per the documentation. This was not caught in local tests as the fallback was always used locally. Patch courtesy of Guanbin Xu . --- pysmctrl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pysmctrl/__init__.py') diff --git a/pysmctrl/__init__.py b/pysmctrl/__init__.py index 5dc6175..e85d2ef 100644 --- a/pysmctrl/__init__.py +++ b/pysmctrl/__init__.py @@ -4,7 +4,7 @@ import os # If this is failing, make sure that the directory containing libsmctrl.so is # in your LD_LIBRARY_PATH environment variable. You likely need something like: # LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/playpen/jbakita/gpu_subdiv/libsmctrl/ -libsmctrl_path = ctypes.util.find_library("libsmctrl") +libsmctrl_path = ctypes.util.find_library("smctrl") if not libsmctrl_path: libsmctrl_path = __path__[0] + "/../libsmctrl.so" libsmctrl = ctypes.CDLL(libsmctrl_path) -- cgit v1.2.2