https://github.com/seb-m/pyinotify/pull/153 Index: python3/pyinotify.py --- python3/pyinotify.py.orig +++ python3/pyinotify.py @@ -211,6 +211,11 @@ class _CtypesLibcINotifyWrapper(INotifyWrapper): except (OSError, IOError): pass # Will attemp to load it with None anyway. + # Special handling for OpenBSD where the library is + # installed in a subdirectory. + if sys.platform.startswith('openbsd'): + libc_name = '${LOCALBASE}/lib/inotify/libinotify.so' + self._libc = ctypes.CDLL(libc_name, use_errno=True) self._get_errno_func = ctypes.get_errno