python.pkgs.shapely: fix library extension
there was one dot too much
This commit is contained in:
parent
1dbe68a5e8
commit
85011d7084
44
pkgs/development/python-modules/shapely/default.nix
Normal file
44
pkgs/development/python-modules/shapely/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi
|
||||
, geos, glibcLocales, pytest, cython, sharedLibraryExtension
|
||||
, numpy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "Shapely";
|
||||
version = "1.5.15";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0lfqxb3kpdn0g9zzlhzg79yc8iyy4fpsk0p5nd80gar1mmhr8pg7";
|
||||
};
|
||||
|
||||
buildInputs = [ geos glibcLocales cython ];
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
|
||||
propagatedBuildInputs = [ numpy ];
|
||||
|
||||
preConfigure = ''
|
||||
export LANG="en_US.UTF-8";
|
||||
'';
|
||||
|
||||
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=['${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/${stdenv.cc.libc}']).free|" shapely/geos.py
|
||||
'';
|
||||
|
||||
# tests/test_voctorized fails because the vectorized extension is not
|
||||
# available in when running tests
|
||||
checkPhase = ''
|
||||
py.test --ignore tests/test_vectorized.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Geometric objects, predicates, and operations";
|
||||
maintainers = with maintainers; [ knedlsepp ];
|
||||
homepage = "https://pypi.python.org/pypi/Shapely/";
|
||||
};
|
||||
}
|
@ -21665,44 +21665,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
shapely = buildPythonPackage rec {
|
||||
name = "Shapely-${version}";
|
||||
version = "1.5.15";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://pypi/S/Shapely/${name}.tar.gz";
|
||||
sha256 = "0lfqxb3kpdn0g9zzlhzg79yc8iyy4fpsk0p5nd80gar1mmhr8pg7";
|
||||
};
|
||||
|
||||
buildInputs = with self; [ pkgs.geos pkgs.glibcLocales pytest cython ];
|
||||
|
||||
propagatedBuildInputs = with self; [ numpy ];
|
||||
|
||||
preConfigure = ''
|
||||
export LANG="en_US.UTF-8";
|
||||
'';
|
||||
|
||||
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
|
||||
# available in when running tests
|
||||
checkPhase = ''
|
||||
py.test --ignore tests/test_vectorized.py
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Geometric objects, predicates, and operations";
|
||||
maintainers = with maintainers; [ knedlsepp ];
|
||||
homepage = "https://pypi.python.org/pypi/Shapely/";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
shapely = callPackage ../development/python-modules/shapely { };
|
||||
|
||||
sopel = buildPythonPackage rec {
|
||||
name = "sopel-6.3.1";
|
||||
|
Loading…
Reference in New Issue
Block a user