diff --git a/pkgs/development/python-modules/shapely/default.nix b/pkgs/development/python-modules/shapely/default.nix index d895f00285d4..d4d52a9bf035 100644 --- a/pkgs/development/python-modules/shapely/default.nix +++ b/pkgs/development/python-modules/shapely/default.nix @@ -5,11 +5,11 @@ buildPythonPackage rec { pname = "Shapely"; - version = "1.7.0"; + version = "1.7.1"; src = fetchPypi { inherit pname version; - sha256 = "07lmrihj6pa7f99m97hbf2anqlhhwippcdz03bqkyihnlkhry6p2"; + sha256 = "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/shapely/library-paths.patch b/pkgs/development/python-modules/shapely/library-paths.patch index 4081936abe36..319eb8a72db5 100644 --- a/pkgs/development/python-modules/shapely/library-paths.patch +++ b/pkgs/development/python-modules/shapely/library-paths.patch @@ -2,7 +2,7 @@ diff --git a/shapely/geos.py b/shapely/geos.py index d5a67d2..19b7ffc 100644 --- a/shapely/geos.py +++ b/shapely/geos.py -@@ -61,123 +61,11 @@ def load_dll(libname, fallbacks=None, mode=DEFAULT_MODE): +@@ -61,127 +61,10 @@ def load_dll(libname, fallbacks=None, mode=DEFAULT_MODE): "Could not find lib {} or load any of its variants {}.".format( libname, fallbacks or [])) @@ -80,7 +80,11 @@ index d5a67d2..19b7ffc 100644 - ] - _lgeos = load_dll('geos_c', fallbacks=alt_paths) - -- free = load_dll('c').free +- # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen +- # manpage says, "If filename is NULL, then the returned handle is for the +- # main program". This way we can let the linker do the work to figure out +- # which libc Python is actually using. +- free = CDLL(None).free - free.argtypes = [c_void_p] - free.restype = None - @@ -112,7 +116,7 @@ index d5a67d2..19b7ffc 100644 - except WindowsError: - # XXX: See http://trac.gispython.org/projects/PCL/ticket/149 - pass - +- -elif sys.platform == 'sunos5': - _lgeos = load_dll('geos_c', fallbacks=['libgeos_c.so.1', 'libgeos_c.so']) - free = CDLL('libc.so.1').free