linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / Rtree / default.nix
blobeb4dae8e3aa2bb285518675e8c656eefd77f4f8b
1 { lib,
2   stdenv,
3   buildPythonPackage,
4   fetchPypi,
5   libspatialindex,
6   numpy,
7   pytestCheckHook
8 }:
10 buildPythonPackage rec {
11   pname = "Rtree";
12   version = "0.9.7";
14   src = fetchPypi {
15     inherit pname version;
16     sha256 = "be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e";
17   };
19   buildInputs = [ libspatialindex ];
21   patchPhase = ''
22     substituteInPlace rtree/finder.py --replace \
23       "find_library('spatialindex_c')" "'${libspatialindex}/lib/libspatialindex_c${stdenv.hostPlatform.extensions.sharedLibrary}'"
24   '';
26   checkInputs = [
27     numpy
28     pytestCheckHook
29   ];
30   pythonImportsCheck = [ "rtree" ];
32   meta = with lib; {
33     description = "R-Tree spatial index for Python GIS";
34     homepage = "https://toblerity.org/rtree/";
35     license = licenses.mit;
36     maintainers = with maintainers; [ bgamari ];
37   };