3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/tifffile/default.nix
2020-08-16 19:31:17 +02:00

54 lines
989 B
Nix

{ lib
, fetchPypi
, buildPythonPackage
, isPy27
, isPy3k
, numpy
, imagecodecs-lite
, enum34
, futures
, pathlib
, pytest
}:
buildPythonPackage rec {
pname = "tifffile";
version = "2020.8.13";
src = fetchPypi {
inherit pname version;
sha256 = "60043e50adab5a1b9f13c3fb1a23992b9af00e1ada13d7ffe48c1ad7e0062cb8";
};
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 = ''
pytest
'';
propagatedBuildInputs = [
numpy
] ++ lib.optionals isPy3k [
imagecodecs-lite
] ++ lib.optionals isPy27 [
futures
enum34
pathlib
];
meta = with lib; {
description = "Read and write image data from and to TIFF files.";
homepage = "https://www.lfd.uci.edu/~gohlke/";
maintainers = [ maintainers.lebastr ];
license = licenses.bsd3;
};
}