1{ lib, stdenv, fetchPypi, buildPythonPackage, isPy27, pythonOlder
2, numpy, nose, enum34, futures }:
3
4buildPythonPackage rec {
5 pname = "tifffile";
6 version = "0.13.5";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "bca0fc9eaf609a27ebd99d8466e05d5a6e79389957f17582b70643dbca65e3d8";
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}