From c681218af74b0f721ace9f1e3d10513446988461 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Sep 2023 17:19:12 +0200 Subject: [PATCH] python311Packages.heudiconv: relax versioningit constraint --- .../python-modules/heudiconv/default.nix | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/heudiconv/default.nix b/pkgs/development/python-modules/heudiconv/default.nix index 2928be6ede9a..514d4e2477b6 100644 --- a/pkgs/development/python-modules/heudiconv/default.nix +++ b/pkgs/development/python-modules/heudiconv/default.nix @@ -1,31 +1,45 @@ { lib , buildPythonPackage -, fetchPypi -, pythonOlder -, pytestCheckHook , datalad -, git , dcm2niix -, nibabel -, pydicom -, nipype , dcmstack , etelemetry +, fetchPypi , filelock +, git +, nibabel +, nipype +, pydicom +, pytestCheckHook +, pythonOlder +, setuptools +, versioningit +, wheel }: buildPythonPackage rec { - version = "0.13.1"; pname = "heudiconv"; + version = "0.13.1"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-UUBRC6RToj4XVbJnxG+EKdue4NVpTAW31RNm9ieF1lU="; + hash = "sha256-UUBRC6RToj4XVbJnxG+EKdue4NVpTAW31RNm9ieF1lU="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "versioningit ~=" "versioningit >=" + ''; + + nativeBuildInputs = [ + setuptools + versioningit + wheel + ]; + propagatedBuildInputs = [ nibabel pydicom @@ -42,7 +56,13 @@ buildPythonPackage rec { git ]; - preCheck = ''export HOME=$(mktemp -d)''; + preCheck = '' + export HOME=$(mktemp -d) + ''; + + pythonImportsCheck = [ + "heudiconv" + ]; meta = with lib; { homepage = "https://heudiconv.readthedocs.io";