From 2fec87a6ded7100bb7b8a847b46c7ab466edfe75 Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Fri, 16 Jan 2015 14:00:46 -0600 Subject: [PATCH] don't use PyDLL if pypy - Thanks mike@tytolidar.com --- python/liblas/core.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/liblas/core.py b/python/liblas/core.py index a51e60ee7..97d142f35 100644 --- a/python/liblas/core.py +++ b/python/liblas/core.py @@ -48,7 +48,8 @@ import ctypes from ctypes.util import find_library -from ctypes import PyDLL +if not 'pypy' in sys.executable: + from ctypes import PyDLL class LASException(Exception): @@ -108,7 +109,7 @@ def check_value_free(result, func, cargs): raise LASException(msg) retval = ctypes.string_at(result)[:] - + return retval @@ -798,7 +799,7 @@ def get_version(): las.LASHeader_SetCompressed.restype = ctypes.c_int las.LASSchema_Create.argtypes = [ctypes.c_uint32] - + las.LASSchema_Create.errcheck = check_void las.LASSchema_Create.restype = ctypes.c_void_p