Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pytestCheckHook, 6 pkg-config, 7 setuptools, 8 libjpeg, 9 libpng, 10 libtiff, 11 libwebp, 12 numpy, 13}: 14 15buildPythonPackage rec { 16 pname = "imread"; 17 version = "0.7.5"; 18 pyproject = true; 19 20 src = fetchPypi { 21 inherit version; 22 pname = "imread"; 23 hash = "sha256-GiWpA128GuLlbBW1CQQHHVVeoZfu9Yyh2RFzSdtHDbc="; 24 }; 25 26 nativeBuildInputs = [ 27 pkg-config 28 setuptools 29 ]; 30 31 buildInputs = [ 32 libjpeg 33 libpng 34 libtiff 35 libwebp 36 ]; 37 38 propagatedBuildInputs = [ numpy ]; 39 40 nativeCheckInputs = [ pytestCheckHook ]; 41 42 pytestFlagsArray = [ 43 # verbose build outputs needed to debug hard-to-reproduce hydra failures 44 "-v" 45 "--pyargs" 46 "imread" 47 ]; 48 49 pythonImportsCheck = [ "imread" ]; 50 51 preCheck = '' 52 cd $TMPDIR 53 export HOME=$TMPDIR 54 export OMP_NUM_THREADS=1 55 ''; 56 57 meta = with lib; { 58 description = "Python package to load images as numpy arrays"; 59 homepage = "https://imread.readthedocs.io/en/latest/"; 60 maintainers = with maintainers; [ luispedro ]; 61 license = licenses.mit; 62 platforms = platforms.unix; 63 }; 64}