mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 22:50:49 +00:00
pythonPackages.shapely: Fix search for libc
This should fix the search for libc's free method on both linux and darwin.
This commit is contained in:
parent
147cd29fff
commit
df96c26e75
|
@ -21672,8 +21672,11 @@ in {
|
|||
export LANG="en_US.UTF-8";
|
||||
'';
|
||||
|
||||
patchPhase = ''
|
||||
sed -i "s|_lgeos = load_dll('geos_c', fallbacks=.*)|_lgeos = load_dll('geos_c', fallbacks=['${pkgs.geos}/lib/libgeos_c.so'])|" shapely/geos.py
|
||||
patchPhase = let
|
||||
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=['${pkgs.geos}/lib/libgeos_c.${sharedLibraryExtension}'])|" 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
|
||||
|
@ -21684,6 +21687,7 @@ in {
|
|||
|
||||
meta = {
|
||||
description = "Geometric objects, predicates, and operations";
|
||||
maintainers = with maintainers; [ knedlsepp ];
|
||||
homepage = "https://pypi.python.org/pypi/Shapely/";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue