pythonPackages.imageio: 1.6 -> 2.4.1 (#49147)

This commit is contained in:
Philipp Middendorf 2018-11-04 18:32:33 +01:00 committed by Robert Schütz
parent 2a3aa769a0
commit ef9b17b484
2 changed files with 24 additions and 9 deletions

View File

@ -1,28 +1,42 @@
{ stdenv { stdenv
, buildPythonPackage , buildPythonPackage
, fetchurl , fetchPypi
, pillow
, psutil
, pytest , pytest
, numpy , numpy
, isPy3k
, futures
, enum34
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "imageio"; pname = "imageio";
version = "1.6"; version = "2.4.1";
src = fetchurl { src = fetchPypi {
url = "https://github.com/imageio/imageio/archive/v${version}.tar.gz"; sha256 = "0jjiwf6wjipmykh33prjh448qv8mpgngfi77ndc7mym5r1xhgf0n";
sha256 = "195snkk3fsbjqd5g1cfsd9alzs5q45gdbi2ka9ph4yxqb31ijrbv"; inherit pname version;
}; };
buildInputs = [ pytest ]; checkInputs = [ pytest psutil ];
propagatedBuildInputs = [ numpy ]; propagatedBuildInputs = [ numpy pillow ] ++ stdenv.lib.optionals (!isPy3k) [
futures
enum34
];
checkPhase = '' checkPhase = ''
export IMAGEIO_USERDIR="$TMP"
export IMAGEIO_NO_INTERNET="true"
export HOME="$(mktemp -d)"
py.test py.test
''; '';
# Tries to write in /var/tmp/.imageio # For some reason, importing imageio also imports xml on Nix, see
doCheck = false; # https://github.com/imageio/imageio/issues/395
postPatch = ''
substituteInPlace tests/test_meta.py --replace '"urllib",' "\"urllib\",\"xml\""
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats"; description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats";

View File

@ -4,6 +4,7 @@
, numpy , numpy
, decorator , decorator
, imageio , imageio
, isPy3k
, tqdm , tqdm
}: }: