python.pkgs.tifffile: 2019.2.10 -> 2019.2.22 and fix build

This commit is contained in:
Robert Schütz
2019-03-02 14:17:57 +01:00
parent 812a99d9ff
commit f9ab0f25f8
2 changed files with 40 additions and 14 deletions
@@ -1,31 +1,34 @@
{ lib, stdenv, fetchPypi, buildPythonPackage, isPy27, pythonOlder
, numpy, nose, enum34, futures, pathlib }:
{ lib, fetchPypi, buildPythonPackage, isPy27
, numpy, enum34, futures, pathlib
, pytest
}:
buildPythonPackage rec {
pname = "tifffile";
# 2018.10.18 and 2018.11.6 are not releases...?
# https://github.com/blink1073/tifffile/issues/54
# anaconda uses 0.15.1
version = "2019.2.10";
version = "2019.2.22";
src = fetchPypi {
inherit pname version;
sha256 = "ead5f84c0b100f8100377b8ef2bcffaf21c249784ddc240346b715408b45f42c";
sha256 = "ed49d75b3eff711dbe74b35324dfd79e0db598b6e772a9096001545e81e95437";
};
checkInputs = [ nose ];
patches = lib.optional isPy27 ./python2-regex-compat.patch;
# Missing dependencies: imagecodecs, czifile, cmapfile, oiffile, lfdfiles
# and test data missing from PyPI tarball
doCheck = false;
checkInputs = [ pytest ];
checkPhase = ''
nosetests --exe -v --exclude="test_extension"
pytest
'';
propagatedBuildInputs = [ numpy ]
++ lib.optional isPy27 [ futures pathlib ]
++ lib.optional (pythonOlder "3.0") enum34;
++ lib.optional isPy27 [ futures enum34 pathlib ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Read and write image data from and to TIFF files.";
homepage = https://github.com/blink1073/tifffile;
homepage = https://www.lfd.uci.edu/~gohlke/;
maintainers = [ maintainers.lebastr ];
license = licenses.bsd2;
license = licenses.bsd3;
};
}