at master 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 setuptools-scm, 9 10 # dependencies 11 dask, 12 numpy, 13 scipy, 14 pandas, 15 pims, 16 17 # tests 18 pyarrow, 19 pytestCheckHook, 20 scikit-image, 21}: 22 23buildPythonPackage rec { 24 pname = "dask-image"; 25 version = "2024.5.3"; 26 pyproject = true; 27 28 src = fetchFromGitHub { 29 owner = "dask"; 30 repo = "dask-image"; 31 tag = "v${version}"; 32 hash = "sha256-kXCAqJ2Zgo/2Khvo2YcK+n4oGM219GyQ2Hsq9re1Lac="; 33 }; 34 35 postPatch = '' 36 substituteInPlace dask_image/ndinterp/__init__.py \ 37 --replace-fail "out_bounds.ptp(axis=1)" "np.ptp(out_bounds, axis=1)" 38 39 substituteInPlace tests/test_dask_image/test_imread/test_core.py \ 40 --replace-fail "fh.save(" "fh.write(" 41 ''; 42 43 build-system = [ 44 setuptools 45 setuptools-scm 46 ]; 47 48 dependencies = [ 49 dask 50 numpy 51 scipy 52 pandas 53 pims 54 ]; 55 56 nativeCheckInputs = [ 57 pyarrow 58 pytestCheckHook 59 scikit-image 60 ]; 61 62 pythonImportsCheck = [ "dask_image" ]; 63 64 disabledTests = [ 65 # The following tests are from 'tests/test_dask_image/test_ndmeasure/test_find_objects.py' and 66 # fail because of errors on numpy slices 67 # AttributeError: 'str' object has no attribute 'start' 68 "test_find_objects" 69 "test_3d_find_objects" 70 71 # AssertionError (comparing slices) 72 "test_find_objects_with_empty_chunks" 73 ]; 74 75 meta = { 76 description = "Distributed image processing"; 77 homepage = "https://github.com/dask/dask-image"; 78 changelog = "https://github.com/dask/dask-image/releases/tag/v${version}"; 79 license = lib.licenses.bsdOriginal; 80 maintainers = with lib.maintainers; [ GaetanLepage ]; 81 }; 82}