1{ lib, stdenv, fetchPypi, buildPythonPackage, isPy27, pythonOlder
2, numpy, nose, enum34, futures }:
3
4buildPythonPackage rec {
5 pname = "tifffile";
6 version = "0.15.1";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "1fbb2cfd57fd8e42e417bc29001a17f319701f1be00e0b8a0004a52da93f1b08";
11 };
12
13 checkInputs = [ nose ];
14 checkPhase = ''
15 nosetests --exe -v --exclude="test_extension"
16 '';
17
18 propagatedBuildInputs = [ numpy ]
19 ++ lib.optional isPy27 futures
20 ++ lib.optional (pythonOlder "3.0") enum34;
21
22 meta = with stdenv.lib; {
23 description = "Read and write image data from and to TIFF files.";
24 homepage = https://github.com/blink1073/tifffile;
25 maintainers = [ maintainers.lebastr ];
26 license = licenses.bsd2;
27 };
28}