diff options
author | Joshua Bakita <jbakita@cs.unc.edu> | 2024-12-23 02:15:31 -0500 |
---|---|---|
committer | Joshua Bakita <jbakita@cs.unc.edu> | 2024-12-23 02:15:31 -0500 |
commit | 5173f55d57a944c4f6a3e018892fc1da55e15571 (patch) | |
tree | 8c6b14d72566dc3883699b8fe9b5b1d8df949ad2 | |
parent | 35f0f1eaf6a99886075a6ee12cc8e0e178aa8308 (diff) |
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 <xugb@mail.ustc.edu.cn>.
-rw-r--r-- | pysmctrl/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
4 | # If this is failing, make sure that the directory containing libsmctrl.so is | 4 | # If this is failing, make sure that the directory containing libsmctrl.so is |
5 | # in your LD_LIBRARY_PATH environment variable. You likely need something like: | 5 | # in your LD_LIBRARY_PATH environment variable. You likely need something like: |
6 | # LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/playpen/jbakita/gpu_subdiv/libsmctrl/ | 6 | # LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/playpen/jbakita/gpu_subdiv/libsmctrl/ |
7 | libsmctrl_path = ctypes.util.find_library("libsmctrl") | 7 | libsmctrl_path = ctypes.util.find_library("smctrl") |
8 | if not libsmctrl_path: | 8 | if not libsmctrl_path: |
9 | libsmctrl_path = __path__[0] + "/../libsmctrl.so" | 9 | libsmctrl_path = __path__[0] + "/../libsmctrl.so" |
10 | libsmctrl = ctypes.CDLL(libsmctrl_path) | 10 | libsmctrl = ctypes.CDLL(libsmctrl_path) |