Correctly find libgeos when running under PyInstaller with Linux, Fixes
@@ -65,6 +65,12 @@ if sys.platform.startswith('linux'):
if len(geos_whl_so) == 1:
_lgeos = CDLL(geos_whl_so[0])
LOG.debug("Found GEOS DLL: %r, using it.", _lgeos)
+ elif hasattr(sys, 'frozen'):
+ geos_pyinstaller_so = glob.glob(os.path.join(sys.prefix,
+ 'libgeos_c-*.so.*'))
+ if len(geos_pyinstaller_so) == 1:
+ _lgeos = CDLL(geos_pyinstaller_so[0])
+ LOG.debug("Found GEOS DLL: %r, using it.", _lgeos)
else:
alt_paths = [
'libgeos_c.so.1',
