From 38ed39653ef378aeae3d2da1e3420af6a7703d32 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 7 Nov 2023 10:15:48 +0100 Subject: [PATCH 1/3] python311Packages.imageio: 2.32.0 -> 2.33.0 Changelog: https://github.com/imageio/imageio/releases/tag/v2.33.0 (cherry picked from commit 08c47e8d91723f13e092cea2dd6e58499c0428c2) --- .../python-modules/imageio/default.nix | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/imageio/default.nix b/pkgs/development/python-modules/imageio/default.nix index 7a5aaaf81e68..864f3d5ba017 100644 --- a/pkgs/development/python-modules/imageio/default.nix +++ b/pkgs/development/python-modules/imageio/default.nix @@ -2,8 +2,7 @@ , stdenv , buildPythonPackage , pythonOlder -, fetchPypi -, fetchpatch +, fetchFromGitHub , isPyPy , substituteAll @@ -32,24 +31,19 @@ buildPythonPackage rec { pname = "imageio"; - version = "2.32.0"; + version = "2.33.0"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-5CWtNsYFMI2eptk+2nsJh5JgWbi4YiDhQqWZp5dRKN0="; + src = fetchFromGitHub { + owner = "imageio"; + repo = "imageio"; + rev = "refs/tags/v${version}"; + hash = "sha256-WoCycrJxo0vyV9LiWnEag1wbld3EJWu8mks8TnYt2+A="; }; - patches = [ - # pillow 10.1.0 compat - (fetchpatch { - name = "imageio-pillow-10.1.0-compat.patch"; - url = "https://github.com/imageio/imageio/commit/f58379c1ae7fbd1da8689937b39e499e2d225740.patch"; - hash = "sha256-jPSl/EUe69Dizkv8CqWpnm+TDPtF3VX2DkHOCEuYTLA="; - }) - ] ++ lib.optionals (!stdenv.isDarwin) [ + patches = lib.optionals (!stdenv.isDarwin) [ (substituteAll { src = ./libgl-path.patch; libgl = "${libGL.out}/lib/libGL${stdenv.hostPlatform.extensions.sharedLibrary}"; From a7116f7c0d66bc9225252594f1b5d310b9a9a565 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 21 Nov 2023 14:51:03 +0100 Subject: [PATCH 2/3] python311Packages.av: disable crashing tests on darwin (cherry picked from commit bad9e110668bd1a0107c13918afae465e1c39aca) --- pkgs/development/python-modules/av/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/av/default.nix b/pkgs/development/python-modules/av/default.nix index b930fd80b99d..e80f521efb2b 100644 --- a/pkgs/development/python-modules/av/default.nix +++ b/pkgs/development/python-modules/av/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchFromGitHub , pythonOlder +, stdenv # build , cython @@ -101,6 +102,10 @@ buildPythonPackage rec { "--deselect=tests/test_subtitles.py::TestSubtitle::test_movtext" "--deselect=tests/test_subtitles.py::TestSubtitle::test_vobsub" "--deselect=tests/test_videoframe.py::TestVideoFrameImage::test_roundtrip" + ] ++ lib.optionals (stdenv.isDarwin) [ + # Segmentation Faults + "--deselect=tests/test_encode.py::TestBasicVideoEncoding::test_encoding_with_pts" + "--deselect=tests/test_pyav.py::test_bayer_write" ]; disabledTests = [ From 05d600c42fe6b6c5b312698acba07cf0566f81c7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 21 Nov 2023 14:54:31 +0100 Subject: [PATCH 3/3] python311Packages.imageio: disable failing tests on darwin One test is crashing the interpreter, same as on pyav. The others require ffmpeg with h264 encoding support, which for some reason is not available on darwin. (cherry picked from commit c4d5c9a79406a1f7a04751fdb1f2b70f694aac9a) --- pkgs/development/python-modules/imageio/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/imageio/default.nix b/pkgs/development/python-modules/imageio/default.nix index 864f3d5ba017..ec4e3a3b749a 100644 --- a/pkgs/development/python-modules/imageio/default.nix +++ b/pkgs/development/python-modules/imageio/default.nix @@ -113,6 +113,16 @@ buildPythonPackage rec { "tests/test_swf.py" ]; + disabledTests = lib.optionals stdenv.isDarwin [ + # Segmentation fault + "test_bayer_write" + # RuntimeError: No valid H.264 encoder was found with the ffmpeg installation + "test_writer_file_properly_closed" + "test_writer_pixelformat_size_verbose" + "test_writer_ffmpeg_params" + "test_reverse_read" + ]; + meta = with lib; { description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats"; homepage = "https://imageio.readthedocs.io";