python3Packages.imageio-ffmpeg: 0.4.2 -> 0.4.3

Also hardcode path to ffmpeg executable.
Can be overridden using $IMAGEIO_FFMPEG_EXE.
This commit is contained in:
Robert Schütz
2021-05-01 20:48:03 +02:00
parent d15fad3dbe
commit b639c57aaa
2 changed files with 68 additions and 16 deletions
@@ -1,29 +1,42 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPy3k
, fetchPypi
, substituteAll
, ffmpeg
, python
}:
buildPythonPackage rec {
pname = "imageio-ffmpeg";
version = "0.4.2";
src = fetchPypi {
inherit pname version;
sha256 = "13b05b17a941a9f4a90b16910b1ffac159448cff051a153da8ba4b4343ffa195";
};
patches = [ (fetchpatch {
# Fixes compatibility with python3.9
# Should be included in the next release after 0.4.2
url = "https://github.com/imageio/imageio-ffmpeg/pull/43/commits/b90c39fe3d29418d67d953588ed9fdf4d848f811.patch";
sha256 = "0d9kf4w6ldwag3s2dr9zjin6wrj66fnl4fn8379ci4q4qfsqgx3f";
})];
version = "0.4.3";
disabled = !isPy3k;
# No test infrastructure in repository.
doCheck = false;
src = fetchPypi {
inherit pname version;
sha256 = "f826260a3207b872f1a4ba87ec0c8e02c00afba4fd03348a59049bdd8215841e";
};
patches = [
(substituteAll {
src = ./ffmpeg-path.patch;
ffmpeg = "${ffmpeg}/bin/ffmpeg";
})
];
checkPhase = ''
runHook preCheck
${python.interpreter} << EOF
from imageio_ffmpeg import get_ffmpeg_version
assert get_ffmpeg_version() == '${ffmpeg.version}'
EOF
runHook postCheck
'';
pythonImportsCheck = [ "imageio_ffmpeg" ];
meta = with lib; {
description = "FFMPEG wrapper for Python";