From 87e495ef4ff7d15382f1297ea7f2656e93756cad Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 27 Feb 2023 02:14:32 +0100 Subject: [PATCH] python3Packages.nibabel: 4.0.2 -> 5.0.1 https://github.com/nipy/nibabel/releases/tag/5.0.0 https://github.com/nipy/nibabel/releases/tag/5.0.1 --- .../python-modules/nibabel/default.nix | 70 ++++++++++++++++--- 1 file changed, 60 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/nibabel/default.nix b/pkgs/development/python-modules/nibabel/default.nix index 54b92a17871b..2c1f0b2ae27c 100644 --- a/pkgs/development/python-modules/nibabel/default.nix +++ b/pkgs/development/python-modules/nibabel/default.nix @@ -1,31 +1,81 @@ { lib , buildPythonPackage , fetchPypi -, isPy27 -, packaging -, pytestCheckHook -, nose +, pythonOlder +, hatchling +, hatch-vcs , numpy -, h5py +, packaging +, importlib-resources , pydicom +, pillow +, h5py , scipy +, git +, pytest-doctestplus +, pytest-httpserver +, pytest-xdist +, pytestCheckHook }: buildPythonPackage rec { pname = "nibabel"; - version = "4.0.2"; - disabled = isPy27; + version = "5.0.1"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - sha256 = "sha256-RcSbU0k1G0X2wEWpGqArTw02dob/MoRjLvlaxluTB4Y="; + hash = "sha256-SvZQFbTMmZQEyvA04cFcGrZ1h5XCXWkH/3T127/p9D4="; }; - propagatedBuildInputs = [ numpy scipy h5py packaging pydicom ]; + nativeBuildInputs = [ + hatchling + hatch-vcs + ]; + + propagatedBuildInputs = [ + numpy + packaging + ] ++ lib.optionals (pythonOlder "3.9") [ + importlib-resources + ]; + + passthru.optional-dependencies = rec { + all = dicom + ++ dicomfs + ++ minc2 + ++ spm + ++ zstd; + dicom = [ + pydicom + ]; + dicomfs = [ + pillow + ] ++ dicom; + minc2 = [ + h5py + ]; + spm = [ + scipy + ]; + zstd = [ + # TODO: pyzstd + ]; + }; nativeCheckInputs = [ + git + pytest-doctestplus + pytest-httpserver + pytest-xdist pytestCheckHook - ]; + ] ++ passthru.optional-dependencies.all; + + preCheck = '' + export PATH=$out/bin:$PATH + ''; disabledTests = [ # https://github.com/nipy/nibabel/issues/951