python3Packages.Rtree: 0.9.7 → 1.0.0

This commit is contained in:
Nikolay Korotkiy 2022-06-02 18:05:01 +03:00 committed by Jonathan Ringer
parent a972e002a8
commit eebbe8c318
No known key found for this signature in database
GPG key ID: 5C841D3CFDFEC4E0

View file

@ -1,32 +1,36 @@
{ lib, { lib
stdenv, , stdenv
buildPythonPackage, , buildPythonPackage
fetchPypi, , fetchPypi
libspatialindex, , libspatialindex
numpy, , numpy
pytestCheckHook , pytestCheckHook
, pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "Rtree"; pname = "rtree";
version = "0.9.7"; version = "1.0.0";
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; pname = "Rtree";
sha256 = "be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e"; inherit version;
sha256 = "sha256-0Eg0ghITRrCTuaQlGNQPkhrfRFkVt66jB+smdoyDloI=";
}; };
buildInputs = [ libspatialindex ]; postPatch = ''
patchPhase = ''
substituteInPlace rtree/finder.py --replace \ 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 = [ checkInputs = [
numpy numpy
pytestCheckHook pytestCheckHook
]; ];
pythonImportsCheck = [ "rtree" ]; pythonImportsCheck = [ "rtree" ];
meta = with lib; { meta = with lib; {