list_ports: use hardcoded path to library on osx
due to a security related change on MacOS, find_library fails. which may
eventually be fixed with a Python update
but it also does not hurt to use the full paths
now, that should work on old and new systems.
related to #509 #518
diff --git a/serial/tools/list_ports_osx.py b/serial/tools/list_ports_osx.py
index 34a7f5a..0c719db 100644
--- a/serial/tools/list_ports_osx.py
+++ b/serial/tools/list_ports_osx.py
@@ -24,12 +24,11 @@
from __future__ import absolute_import
import ctypes
-import ctypes.util
from serial.tools import list_ports_common
-iokit = ctypes.cdll.LoadLibrary(ctypes.util.find_library('IOKit'))
-cf = ctypes.cdll.LoadLibrary(ctypes.util.find_library('CoreFoundation'))
+iokit = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/IOKit.framework/IOKit')
+cf = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation')
kIOMasterPortDefault = ctypes.c_void_p.in_dll(iokit, "kIOMasterPortDefault")
kCFAllocatorDefault = ctypes.c_void_p.in_dll(cf, "kCFAllocatorDefault")