Commit 6115337d authored by Denis Bilenko's avatar Denis Bilenko

setup.py: if ctypes inquiry fails, continue with compilation instead of failing with stacktrace

- this leads to better error information, esp. with easy_install which suppresses stackrace
parent 981ec9a1
......@@ -160,8 +160,11 @@ else:
LIBEVENT_MAJOR = get_version_from_library_path(d)
if LIBEVENT_MAJOR is None and ctypes:
libevent = ctypes.cdll.LoadLibrary(libevent_fn)
LIBEVENT_MAJOR = get_version_from_ctypes(libevent, libevent_fn)
try:
libevent = ctypes.cdll.LoadLibrary(libevent_fn)
LIBEVENT_MAJOR = get_version_from_ctypes(libevent, libevent_fn)
except OSError:
pass
# search system library dirs (unless explicit library directory was provided)
if LIBEVENT_MAJOR is None and not library_dirs:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment