at 24.05-pre 891 B view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, libspatialindex 6, numpy 7, pytestCheckHook 8, pythonOlder 9}: 10 11buildPythonPackage rec { 12 pname = "rtree"; 13 version = "1.1.0"; 14 disabled = pythonOlder "3.7"; 15 16 src = fetchPypi { 17 pname = "Rtree"; 18 inherit version; 19 hash = "sha256-b47lBN3l0AWyWwiq9b4LNASvOtX+zm4d3N41kIp5ipU="; 20 }; 21 22 postPatch = '' 23 substituteInPlace rtree/finder.py --replace \ 24 'find_library("spatialindex_c")' '"${libspatialindex}/lib/libspatialindex_c${stdenv.hostPlatform.extensions.sharedLibrary}"' 25 ''; 26 27 buildInputs = [ libspatialindex ]; 28 29 nativeCheckInputs = [ 30 numpy 31 pytestCheckHook 32 ]; 33 34 pythonImportsCheck = [ "rtree" ]; 35 36 meta = with lib; { 37 description = "R-Tree spatial index for Python GIS"; 38 homepage = "https://toblerity.org/rtree/"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ bgamari ]; 41 }; 42}