1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 pytestCheckHook, 7 future, 8 numpy, 9 pillow, 10 scipy, 11 scikit-learn, 12 scikit-image, 13 threadpoolctl, 14}: 15 16buildPythonPackage rec { 17 pname = "batchgenerators"; 18 version = "0.25"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "MIC-DKFZ"; 25 repo = pname; 26 rev = "v${version}"; 27 hash = "sha256-L2mWH2t8PN9o1M67KDdl1Tj2ZZ02MY4icsJY2VNrj3A="; 28 }; 29 30 propagatedBuildInputs = [ 31 future 32 numpy 33 pillow 34 scipy 35 scikit-learn 36 scikit-image 37 threadpoolctl 38 ]; 39 40 # see https://github.com/MIC-DKFZ/batchgenerators/pull/78 41 postPatch = '' 42 substituteInPlace setup.py \ 43 --replace '"unittest2",' "" 44 ''; 45 46 nativeCheckInputs = [ pytestCheckHook ]; 47 48 # see https://github.com/MIC-DKFZ/batchgenerators/pull/78 49 disabledTestPaths = [ "tests/test_axis_mirroring.py" ]; 50 51 pythonImportsCheck = [ 52 "batchgenerators" 53 "batchgenerators.augmentations" 54 "batchgenerators.dataloading" 55 "batchgenerators.datasets" 56 "batchgenerators.transforms" 57 "batchgenerators.utilities" 58 ]; 59 60 meta = with lib; { 61 description = "2D and 3D image data augmentation for deep learning"; 62 homepage = "https://github.com/MIC-DKFZ/batchgenerators"; 63 license = licenses.asl20; 64 maintainers = with maintainers; [ bcdarwin ]; 65 }; 66}