From 66a1d1d6ecf12c48b2d9699216eb9cf42eb1a241 Mon Sep 17 00:00:00 2001 From: Jeffrey Bester Date: Thu, 28 Jan 2016 19:14:35 -0500 Subject: [PATCH] Added osx support to ctypes wrapper --- _nanomsg_ctypes/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_nanomsg_ctypes/__init__.py b/_nanomsg_ctypes/__init__.py index 32fa718..ee655c3 100644 --- a/_nanomsg_ctypes/__init__.py +++ b/_nanomsg_ctypes/__init__.py @@ -8,6 +8,9 @@ if sys.platform in ('win32', 'cygwin'): _functype = ctypes.WINFUNCTYPE _lib = ctypes.windll.nanomsg +elif sys.platform in ('darwin'): + _functype = ctypes.CFUNCTYPE + _lib = ctypes.cdll.LoadLibrary('libnanomsg.dylib') else: _functype = ctypes.CFUNCTYPE _lib = ctypes.cdll.LoadLibrary('libnanomsg.so')