Permalink
Browse files

Use ctypes.util.find_library to find library name.

  • Loading branch information...
smira committed Jul 5, 2011
1 parent 385cdba commit 808c9ba54dcd6525e4449b9e54da7501fc708a53
Showing with 2 additions and 2 deletions.
  1. +2 −2 zmq/_zmq.py
View
@@ -25,14 +25,14 @@
# <http://www.gnu.org/licenses/>.
import random
import platform
# hack to avoid twisted tests failure
import py
import pytest
#
from ctypes import *
from ctypes.util import find_library
from ctypes_configure import configure
class CConfigure(object):
@@ -94,7 +94,7 @@ def _check_zmq_errno(result, func, arguments):
raise ZMQError(errno)
return result
libzmq = CDLL("libzmq" + (".dylib" if platform.system() == "Darwin" else ".so"), use_errno=True)
libzmq = CDLL(find_library("zmq"), use_errno=True)
libzmq.zmq_version.restype = None
libzmq.zmq_version.argtypes = [POINTER(c_int)]*3

0 comments on commit 808c9ba

Please sign in to comment.