python3Packages.Rtree: 0.9.7 → 1.0.0

main
Nikolay Korotkiy 2 years ago committed by Jonathan Ringer
parent a972e002a8
commit eebbe8c318
No known key found for this signature in database
GPG Key ID: 5C841D3CFDFEC4E0
  1. 34
      pkgs/development/python-modules/Rtree/default.nix

@ -1,32 +1,36 @@
{ lib,
stdenv,
buildPythonPackage,
fetchPypi,
libspatialindex,
numpy,
pytestCheckHook
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, libspatialindex
, numpy
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "Rtree";
version = "0.9.7";
pname = "rtree";
version = "1.0.0";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e";
pname = "Rtree";
inherit version;
sha256 = "sha256-0Eg0ghITRrCTuaQlGNQPkhrfRFkVt66jB+smdoyDloI=";
};
buildInputs = [ libspatialindex ];
patchPhase = ''
postPatch = ''
substituteInPlace rtree/finder.py --replace \
"find_library('spatialindex_c')" "'${libspatialindex}/lib/libspatialindex_c${stdenv.hostPlatform.extensions.sharedLibrary}'"
'find_library("spatialindex_c")' '"${libspatialindex}/lib/libspatialindex_c${stdenv.hostPlatform.extensions.sharedLibrary}"'
'';
buildInputs = [ libspatialindex ];
checkInputs = [
numpy
pytestCheckHook
];
pythonImportsCheck = [ "rtree" ];
meta = with lib; {

Loading…
Cancel
Save