2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2022-04-15 01:41:22 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-10-21 18:38:19 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2022-04-15 01:41:22 +00:00
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
, imageio-ffmpeg
|
|
|
|
, numpy
|
2021-05-20 23:08:51 +00:00
|
|
|
, pillow
|
|
|
|
, psutil
|
|
|
|
, pytestCheckHook
|
2021-12-26 17:43:05 +00:00
|
|
|
, tifffile
|
2022-04-15 01:41:22 +00:00
|
|
|
, fsspec
|
|
|
|
, libGL
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "imageio";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2.28.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-XbUIe+XIFOz34sfTChoVyX7Kl9jCbzHdxU12fUpDvOg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
patches = lib.optionals (!stdenv.isDarwin) [
|
2022-04-15 01:41:22 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./libgl-path.patch;
|
|
|
|
libgl = "${libGL.out}/lib/libGL${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
imageio-ffmpeg
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
fsspec
|
2021-05-20 23:08:51 +00:00
|
|
|
psutil
|
|
|
|
pytestCheckHook
|
2021-12-26 17:43:05 +00:00
|
|
|
tifffile
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m 'not needs_internet'"
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
export IMAGEIO_USERDIR="$TMP"
|
2022-04-15 01:41:22 +00:00
|
|
|
export HOME=$TMPDIR
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabledTestPaths = [
|
2022-04-15 01:41:22 +00:00
|
|
|
# tries to fetch fixtures over the network
|
|
|
|
"tests/test_freeimage.py"
|
2021-12-26 17:43:05 +00:00
|
|
|
"tests/test_pillow.py"
|
2022-04-15 01:41:22 +00:00
|
|
|
"tests/test_spe.py"
|
|
|
|
"tests/test_swf.py"
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://imageio.readthedocs.io";
|
|
|
|
changelog = "https://github.com/imageio/imageio/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd2;
|
2022-09-30 11:47:45 +00:00
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|