diff options
author | Robert Schütz <rschuetz17@gmail.com> | 2019-02-22 12:26:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-22 12:26:29 +0100 |
commit | 76edd961f5545502ffb2f8fa21388700682c961e (patch) | |
tree | 1342eed2c53b82c07b8d91c8b27bc1e22bc6932d | |
parent | b4d914c7bc17d4a378e51f4ea2cbde08dfe5e024 (diff) | |
parent | 47519a1e4ef4f7d6c4237a617388d6d4919807f4 (diff) |
Merge pull request #56135 from plapadoo/imageio-update
python3Packages.imageio: 2.4.1 -> 2.5.0
-rw-r--r-- | pkgs/development/python-modules/imageio-ffmpeg/default.nix | 28 | ||||
-rw-r--r-- | pkgs/development/python-modules/imageio/default.nix | 18 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 44 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/imageio-ffmpeg/default.nix b/pkgs/development/python-modules/imageio-ffmpeg/default.nix new file mode 100644 index 000000000000..f72698fd0d13 --- /dev/null +++ b/pkgs/development/python-modules/imageio-ffmpeg/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isPy3k +}: + +buildPythonPackage rec { + pname = "imageio-ffmpeg"; + version = "0.2.0"; + + src = fetchPypi { + sha256 = "191k77hd69lfmd8p4w02c2ajjdsall6zijn01gyhqi11n48wpsib"; + inherit pname version; + }; + + disabled = !isPy3k; + + # No test infrastructure in repository. + doCheck = false; + + meta = with lib; { + description = "FFMPEG wrapper for Python"; + homepage = https://github.com/imageio/imageio-ffmpeg; + license = licenses.bsd2; + maintainers = [ maintainers.pmiddend ]; + }; + +} diff --git a/pkgs/development/python-modules/imageio/default.nix b/pkgs/development/python-modules/imageio/default.nix index de8380280670..f7b3ff63c53c 100644 --- a/pkgs/development/python-modules/imageio/default.nix +++ b/pkgs/development/python-modules/imageio/default.nix @@ -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; { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0077482ab17e..c31f10167f05 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2794,6 +2794,8 @@ in { imageio = callPackage ../development/python-modules/imageio { }; + imageio-ffmpeg = callPackage ../development/python-modules/imageio-ffmpeg { }; + imgaug = callPackage ../development/python-modules/imgaug { }; inflection = callPackage ../development/python-modules/inflection { }; |