Dear Shapely-Developers,
First: thank you for Shapely!
I have to install Shapely on a cluster (scientific linux), where i don't have
root privilegs. Python, as well as libgeos_c are installed (from source) under
$HOME/local/lib and $HOME/local/bin. The first is in $LD_LIBRARY_PATH and the
latter in $PATH. Unfortunatly ctypes.find_library seems to fail under these
circumstances. Can you fix geos.py to fall back to the any *nix variant, for
loading libgeos_c, if find_library does not find the library?
A possible solution (working for me) could be changing line 28-32 in geos.py to
(inspired by your code line 83-92):
if sys.platform == 'linux2':
lib = find_library('geos_c')
if lib is None:
try:
_lgeos = CDLL('libgeos_c.so.1')
except (OSError, ImportError):
_lgeos = CDLL('libgeos_c.so')
except:
raise
else:
_lgeos = CDLL(lib)
free = CDLL(find_library('c')).free
free.argtypes = [c_void_p]
free.restype = None
Thank you,
Philipp
--
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community