Merge pull request #30260 from lsix/fix_shapely

pythonPackages.shapely: 1.5.15 -> 1.6.1
This commit is contained in:
Lancelot SIX 2017-10-12 14:28:41 +02:00 committed by GitHub
commit 64e5583c7a

View File

@ -6,11 +6,11 @@
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "Shapely";
version = "1.5.15";
version = "1.6.1";
src = fetchPypi {
inherit pname version;
sha256 = "0lfqxb3kpdn0g9zzlhzg79yc8iyy4fpsk0p5nd80gar1mmhr8pg7";
sha256 = "1iyhrkm6g233gwbd20sf4aq4by0kg52cz1d2k7imnqgzjpmkgqas";
};
buildInputs = [ geos glibcLocales cython ];
@ -27,7 +27,7 @@ buildPythonPackage rec {
libc = if stdenv.isDarwin then "libc.dylib" else "libc.so.6";
in ''
sed -i "s|_lgeos = load_dll('geos_c', fallbacks=.*)|_lgeos = load_dll('geos_c', fallbacks=['${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}'])|" shapely/geos.py
sed -i "s|free = load_dll('c').free|free = load_dll('c', fallbacks=['${stdenv.cc.libc}/lib/${stdenv.cc.libc}']).free|" shapely/geos.py
sed -i "s|free = load_dll('c').free|free = load_dll('c', fallbacks=['${stdenv.cc.libc}/lib/${libc}']).free|" shapely/geos.py
'';
# tests/test_voctorized fails because the vectorized extension is not