Merge pull request #293391 from luispedro/fix_293191_imread_testing

python311Packages.imread: Fix testing
This commit is contained in:
Robert Schütz
2024-03-05 07:38:16 +00:00
committed by GitHub
@@ -1,8 +1,9 @@
{ lib
, buildPythonPackage
, fetchPypi
, nose
, pytestCheckHook
, pkg-config
, setuptools
, libjpeg
, libpng
, libtiff
@@ -13,18 +14,48 @@
buildPythonPackage rec {
pname = "python-imread";
version = "0.7.5";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "imread";
sha256 = "sha256-GiWpA128GuLlbBW1CQQHHVVeoZfu9Yyh2RFzSdtHDbc=";
hash = "sha256-GiWpA128GuLlbBW1CQQHHVVeoZfu9Yyh2RFzSdtHDbc=";
};
nativeBuildInputs = [
pkg-config
setuptools
];
buildInputs = [
libjpeg
libpng
libtiff
libwebp
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ nose libjpeg libpng libtiff libwebp ];
propagatedBuildInputs = [ numpy ];
nativeCheckInputs = [
pytestCheckHook
];
pytestFlagsArray = [
# verbose build outputs needed to debug hard-to-reproduce hydra failures
"-v"
"--pyargs" "imread"
];
pythonImportsCheck = [
"imread"
];
preCheck = ''
cd $TMPDIR
export HOME=$TMPDIR
export OMP_NUM_THREADS=1
'';
meta = with lib; {
description = "Python package to load images as numpy arrays";
homepage = "https://imread.readthedocs.io/en/latest/";