depot/third_party/nixpkgs/pkgs/development/python-modules/tifffile/default.nix
Default email 2ce89355c3 Project import generated by Copybara.
GitOrigin-RevId: 22a81aa5fc15b2d41b12f7160a71cd4a9f3c3fa1
2020-06-15 17:56:04 +02:00

53 lines
988 B
Nix

{ lib
, fetchPypi
, buildPythonPackage
, isPy27
, isPy3k
, numpy
, imagecodecs-lite
, enum34
, futures
, pathlib
, pytest
}:
buildPythonPackage rec {
pname = "tifffile";
version = "2020.6.3";
src = fetchPypi {
inherit pname version;
sha256 = "e79403a8b98b0df7ade8d43469151b959fd56239001471fac62beabca6f56377";
};
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;
};
}