Commit 4dd72992 authored by Mark J. Blair's avatar Mark J. Blair Committed by GitHub

Merge pull request #3 from vcasadei/master

Fix for ctypes.util.find_libraries()on linux
parents ecb77265 a351dd40
......@@ -65,6 +65,7 @@ Public functions defined by this module:
from ctypes import *
from ctypes.util import find_library
from sys import platform
# Define public classes:
......@@ -161,7 +162,10 @@ def __load_hidapi():
raise RuntimeError('Could not find the hidapi shared library.')
# Load the hidapi library.
__hidapi = CDLL(__libpath)
if platform == "linux" or platform == "linux2":
__hidapi = CDLL(r"/usr/local/lib/{}".format(__libpath))
else:
__hidapi = CDLL(__libpath)
assert __hidapi is not None
# Define argument and return types for the hidapi library functions.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment