python3Packages.imageio: 2.4.1 -> 2.5.0

This commit is contained in:
Philipp Middendorf
2019-02-21 09:40:41 +01:00
parent 89401b0e3e
commit 47519a1e4e
3 changed files with 19 additions and 7 deletions

View File

@@ -1,28 +1,34 @@
{ stdenv
, buildPythonPackage
, pathlib
, fetchPypi
, pillow
, psutil
, imageio-ffmpeg
, pytest
, numpy
, isPy3k
, ffmpeg
, futures
, enum34
}:
buildPythonPackage rec {
pname = "imageio";
version = "2.4.1";
version = "2.5.0";
src = fetchPypi {
sha256 = "0jjiwf6wjipmykh33prjh448qv8mpgngfi77ndc7mym5r1xhgf0n";
sha256 = "1bdcrr5190jvk0msw2lswj4pbdhrcggjpj8m6q2a2mrxzjnmmrj2";
inherit pname version;
};
checkInputs = [ pytest psutil ];
checkInputs = [ pytest psutil ] ++ stdenv.lib.optionals isPy3k [
imageio-ffmpeg ffmpeg
];
propagatedBuildInputs = [ numpy pillow ] ++ stdenv.lib.optionals (!isPy3k) [
futures
enum34
pathlib
];
checkPhase = ''
@@ -34,8 +40,12 @@ buildPythonPackage rec {
# For some reason, importing imageio also imports xml on Nix, see
# https://github.com/imageio/imageio/issues/395
# Also, there are tests that test the downloading of ffmpeg if it's not installed.
# "Uncomment" those by renaming.
postPatch = ''
substituteInPlace tests/test_meta.py --replace '"urllib",' "\"urllib\",\"xml\""
substituteInPlace tests/test_meta.py --replace '"urllib",' "\"urllib\",\"xml\","
substituteInPlace tests/test_ffmpeg.py --replace 'test_get_exe_installed' 'get_exe_installed'
'';
meta = with stdenv.lib; {