Skip to content

Commit

Permalink
Merge pull request #282165 from r-ryantm/auto-update/python311Package…
Browse files Browse the repository at this point in the history
…s.rtree

python311Packages.rtree: 1.1.0 -> 1.2.0
  • Loading branch information
natsukium authored Jan 25, 2024
2 parents d7d7e12 + 51723c2 commit ae5c332
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions pkgs/development/python-modules/rtree/default.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, libspatialindex
, numpy
, pytestCheckHook
, pythonOlder
, setuptools
, wheel
}:

buildPythonPackage rec {
pname = "rtree";
version = "1.1.0";
format = "setuptools";
disabled = pythonOlder "3.7";

src = fetchPypi {
pname = "Rtree";
inherit version;
hash = "sha256-b47lBN3l0AWyWwiq9b4LNASvOtX+zm4d3N41kIp5ipU=";
version = "1.2.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "Toblerity";
repo = "rtree";
rev = "refs/tags/${version}";
hash = "sha256-RmAiyYrkUMBN/ebmo27WvFcRmYlKkywuQHLLUbluTTw=";
};

postPatch = ''
substituteInPlace rtree/finder.py --replace \
'find_library("spatialindex_c")' '"${libspatialindex}/lib/libspatialindex_c${stdenv.hostPlatform.extensions.sharedLibrary}"'
'';

nativeBuildInputs = [
setuptools
wheel
];

buildInputs = [ libspatialindex ];

nativeCheckInputs = [
Expand All @@ -36,7 +45,8 @@ buildPythonPackage rec {

meta = with lib; {
description = "R-Tree spatial index for Python GIS";
homepage = "https://toblerity.org/rtree/";
homepage = "https://github.com/Toblerity/rtree";
changelog = "https://github.com/Toblerity/rtree/blob/${version}/CHANGES.rst";
license = licenses.mit;
maintainers = with maintainers; [ bgamari ];
};
Expand Down

0 comments on commit ae5c332

Please sign in to comment.