aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/dask-image/default.nix
blob: f119cf2b0b8be6184a9b24324921e06d0338e3fa (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
{ stdenv
, buildPythonPackage
, fetchPypi
, fetchpatch
, dask
, numpy, toolz # dask[array]
, scipy
, pims
, pytest
, pytest-flake8
, scikitimage
}:

buildPythonPackage rec {
  version = "0.3.0";
  pname = "dask-image";

  src = fetchPypi {
    inherit pname version;
    sha256 = "15svy8y57i30878pijyd0pxn10bnk7ffmmgwva5rpip4b7grsgv0";
  };

  nativeBuildInputs = [ pytest-flake8 ];
  propagatedBuildInputs = [ dask numpy toolz scipy pims ];
  checkInputs = [
    pytest
    scikitimage
  ];

  # ignore errors from newer versions of flake8
  prePatch = ''
    substituteInPlace setup.cfg \
      --replace "docs/conf.py,versioneer.py" \
        "docs/conf.py,versioneer.py,dask_image/ndfilters/_utils.py"
  '';

  # scikit.external is not exported
  checkPhase = ''
    pytest --ignore=tests/test_dask_image/
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/dask/dask-image";
    description = "Distributed image processing";
    license = licenses.bsdOriginal;
    maintainers = [ maintainers.costrouc ];
  };
}