summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/trx-python/default.nix
blob: 0fa7c684d7f05550889010edeeb63e6786623c6e (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  cython,
  setuptools,
  setuptools-scm,
  deepdiff,
  nibabel,
  numpy,
  pytestCheckHook,
  psutil,
}:

buildPythonPackage rec {
  pname = "trx-python";
  version = "0.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "tee-ar-ex";
    repo = "trx-python";
    tag = version;
    hash = "sha256-gKPgP3GJ7QY0Piylk5L0HxnscRCREP1Hm5HZufL2h5g=";
  };

  build-system = [
    cython
    setuptools
    setuptools-scm
  ];

  dependencies = [
    deepdiff
    nibabel
    numpy
  ];

  pythonImportsCheck = [ "trx" ];

  nativeCheckInputs = [
    pytestCheckHook
    psutil
  ];

  preCheck = ''
    export HOME=$TMPDIR
  '';

  enabledTestPaths = [ "trx/tests" ];

  disabledTestPaths = [
    # access to network
    "trx/tests/test_memmap.py"
    "trx/tests/test_io.py"
  ];

  meta = {
    description = "Python implementation of the TRX file format";
    homepage = "https://github.com/tee-ar-ex/trx-python";
    changelog = "https://github.com/tee-ar-ex/trx-python/releases/tag/${version}";
    license = lib.licenses.bsd2;
    maintainers = [ ];
  };
}