$OpenBSD: patch-python2_pyinotify_py,v 1.2 2018/01/24 18:40:18 jasper Exp $

https://github.com/seb-m/pyinotify/pull/153

Index: python2/pyinotify.py
--- python2/pyinotify.py.orig
+++ python2/pyinotify.py
@@ -213,6 +213,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'
+
         if sys.version_info >= (2, 6):
             self._libc = ctypes.CDLL(libc_name, use_errno=True)
             self._get_errno_func = ctypes.get_errno
