From 3f4aa4721f1cbe137c6ac55b1d4446adc71e3746 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 19 Jan 2024 22:56:08 +0000 Subject: [PATCH 1/2] python311Packages.rtree: 1.1.0 -> 1.2.0 --- pkgs/development/python-modules/rtree/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rtree/default.nix b/pkgs/development/python-modules/rtree/default.nix index b4a2cc68ab8f..1ca2c44b035b 100644 --- a/pkgs/development/python-modules/rtree/default.nix +++ b/pkgs/development/python-modules/rtree/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "rtree"; - version = "1.1.0"; + version = "1.2.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { pname = "Rtree"; inherit version; - hash = "sha256-b47lBN3l0AWyWwiq9b4LNASvOtX+zm4d3N41kIp5ipU="; + hash = "sha256-9RRfeFK/f5XBJvsWvxpMLKkwCuFRsH+KD3CD6keRJnU="; }; postPatch = '' From 51723c2eac7ab16544bca076a89e3c3ac5ea1ed5 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 20 Jan 2024 10:17:25 +0900 Subject: [PATCH 2/2] python311Packages.rtree: refactor --- .../python-modules/rtree/default.nix | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/rtree/default.nix b/pkgs/development/python-modules/rtree/default.nix index 1ca2c44b035b..ff4b3b85e9cf 100644 --- a/pkgs/development/python-modules/rtree/default.nix +++ b/pkgs/development/python-modules/rtree/default.nix @@ -1,23 +1,27 @@ { lib , stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub , libspatialindex , numpy , pytestCheckHook , pythonOlder +, setuptools +, wheel }: buildPythonPackage rec { pname = "rtree"; version = "1.2.0"; - format = "setuptools"; - disabled = pythonOlder "3.7"; + pyproject = true; - src = fetchPypi { - pname = "Rtree"; - inherit version; - hash = "sha256-9RRfeFK/f5XBJvsWvxpMLKkwCuFRsH+KD3CD6keRJnU="; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "Toblerity"; + repo = "rtree"; + rev = "refs/tags/${version}"; + hash = "sha256-RmAiyYrkUMBN/ebmo27WvFcRmYlKkywuQHLLUbluTTw="; }; postPatch = '' @@ -25,6 +29,11 @@ buildPythonPackage rec { 'find_library("spatialindex_c")' '"${libspatialindex}/lib/libspatialindex_c${stdenv.hostPlatform.extensions.sharedLibrary}"' ''; + nativeBuildInputs = [ + setuptools + wheel + ]; + buildInputs = [ libspatialindex ]; nativeCheckInputs = [ @@ -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 ]; };