about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/nipy/default.nix
blob: 1a1813ebb8afbd005375ce819bad169317c626d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{ lib
, buildPythonPackage
, fetchPypi

# build-system
, cython_3
, meson-python
, ninja
, setuptools

# dependencies
, numpy
, scipy
, nibabel
, sympy
, transforms3d

# optional-dependencies
, matplotlib

# tests
, pytestCheckHook
}:

buildPythonPackage rec {
  version = "0.6.0";
  pname = "nipy";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-BTn2nV4VMeT8bxTOJTHjRU8I2bxFZCzIZCZVn/QcUrk=";
  };

  postPatch = ''
    patchShebangs nipy/_build_utils/cythoner.py
  '';

  build-system = [
    cython_3
    meson-python
    setuptools
    ninja
    numpy
  ];

  dependencies = [
    nibabel
    numpy
    scipy
    sympy
    transforms3d
  ];

  optional-dependencies.optional = [
    matplotlib
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ] ++ optional-dependencies.optional;

  doCheck = false; # partial imports … circular dependencies. needs more time to figure out.

  pythonImportsCheck = [
    "nipy"
    "nipy.testing"
    "nipy.algorithms"
  ];

  meta = with lib; {
    homepage = "https://nipy.org/nipy";
    description = "Software for structural and functional neuroimaging analysis";
    downloadPage = "https://github.com/nipy/nipy";
    license = licenses.bsd3;
  };

}