From 75c3ed6d05d16d6fb705d12dbfa3737436ac32b2 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Thu, 25 Jul 2024 12:20:55 -0400 Subject: [PATCH] python311Packages.fslpy: init at 3.21.1 --- .../python-modules/fslpy/default.nix | 98 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 100 insertions(+) create mode 100644 pkgs/development/python-modules/fslpy/default.nix diff --git a/pkgs/development/python-modules/fslpy/default.nix b/pkgs/development/python-modules/fslpy/default.nix new file mode 100644 index 000000000000..0633b9b5133c --- /dev/null +++ b/pkgs/development/python-modules/fslpy/default.nix @@ -0,0 +1,98 @@ +{ + lib, + buildPythonPackage, + pythonOlder, + fetchFromGitLab, + setuptools, + dill, + h5py, + nibabel, + numpy, + scipy, + indexed-gzip, + pillow, + rtree, + trimesh, + wxpython, + pytestCheckHook, + pytest-cov-stub, + tomli, +}: + +buildPythonPackage rec { + pname = "fslpy"; + version = "3.21.1"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitLab { + domain = "git.fmrib.ox.ac.uk"; + owner = "fsl"; + repo = "fslpy"; + rev = "refs/tags/${version}"; + hash = "sha256-O0bhzu6zZeuGJqXAwlgM8qHkgtaGCmg7xSkOqbZH2eA="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + dill + h5py + nibabel + numpy + scipy + ]; + + optional-dependencies = { + extra = [ + indexed-gzip + pillow + rtree + trimesh + wxpython + ]; + }; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + tomli + ] ++ optional-dependencies.extra; + + disabledTestPaths = [ + # tries to download data: + "fsl/tests/test_dicom.py" + # tests exit with "SystemExit: Unable to access the X Display, is $DISPLAY set properly?" + "fsl/tests/test_idle.py" + "fsl/tests/test_platform.py" + # require FSL's atlas library (via $FSLDIR), which has an unfree license: + "fsl/tests/test_atlases.py" + "fsl/tests/test_atlases_query.py" + "fsl/tests/test_parse_data.py" + "fsl/tests/test_scripts/test_atlasq_list_summary.py" + "fsl/tests/test_scripts/test_atlasq_ohi.py" + "fsl/tests/test_scripts/test_atlasq_query.py" + # requires FSL (unfree and not in Nixpkgs): + "fsl/tests/test_fslsub.py" + "fsl/tests/test_run.py" + "fsl/tests/test_wrappers" + ]; + + pythonImportsCheck = [ + "fsl" + "fsl.data" + "fsl.scripts" + "fsl.transform" + "fsl.utils" + "fsl.wrappers" + ]; + + meta = { + description = "FSL Python library"; + homepage = "https://git.fmrib.ox.ac.uk/fsl/fslpy"; + changelog = "https://git.fmrib.ox.ac.uk/fsl/fslpy/-/blob/main/CHANGELOG.rst"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b033b1a3ad23..fe906ad5911f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4782,6 +4782,8 @@ self: super: with self; { fschat = callPackage ../development/python-modules/fschat { }; + fslpy = callPackage ../development/python-modules/fslpy { }; + fsspec-xrootd = callPackage ../development/python-modules/fsspec-xrootd { }; fsspec = callPackage ../development/python-modules/fsspec { };