summary refs log tree commit diff
path: root/pkgs/development/python-modules/imageio/default.nix
blob: 0a97a27d17f8c1562c339a9f79bc59efae36c689 (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
{ lib
, buildPythonPackage
, isPy27
, fetchPypi
, imageio-ffmpeg
, numpy
, pillow
, psutil
, pytestCheckHook
, tifffile
}:

buildPythonPackage rec {
  pname = "imageio";
  version = "2.13.2";
  disabled = isPy27;

  src = fetchPypi {
    sha256 = "5b7a55d07de88a2fd70f18a1608ca05ba2b55596a942fb2c390240201009a6c3";
    inherit pname version;
  };

  propagatedBuildInputs = [
    imageio-ffmpeg
    numpy
    pillow
  ];

  checkInputs = [
    psutil
    pytestCheckHook
    tifffile
  ];

  preCheck = ''
    export IMAGEIO_USERDIR="$TMP"
    export IMAGEIO_NO_INTERNET="true"
    export HOME="$(mktemp -d)"
  '';

  disabledTests = [
    # tries to pull remote resources, even with IMAGEIO_NO_INTERNET
    "test_png_remote"
    # needs git history
    "test_mvolread_out_of_bytes"
    "test_imiter"
    "test_memory_size"
    "test_legacy_write_empty"
  ];

  disabledTestPaths = [
    "tests/test_pillow.py"
  ];

  meta = with lib; {
    description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats";
    homepage = "http://imageio.github.io/";
    license = licenses.bsd2;
  };
}