nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 68 lines 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, pytestCheckHook 6, future 7, numpy 8, pillow 9, fetchpatch 10, scipy 11, scikit-learn 12, scikitimage 13, threadpoolctl 14}: 15 16buildPythonPackage rec { 17 pname = "batchgenerators"; 18 version = "0.21"; 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-q8mBWcy+PkJcfiKtq8P2bnTw56FE1suVS0zUgUEmc5k="; 28 }; 29 30 propagatedBuildInputs = [ 31 future 32 numpy 33 pillow 34 scipy 35 scikit-learn 36 scikitimage 37 threadpoolctl 38 ]; 39 40 checkInputs = [ 41 pytestCheckHook 42 ]; 43 44 patches = [ 45 # Remove deprecated unittest2, https://github.com/MIC-DKFZ/batchgenerators/pull/78 46 (fetchpatch { 47 name = "remove-unittest2.patch"; 48 url = "https://github.com/MIC-DKFZ/batchgenerators/commit/87a9437057df8a7550aa3b3eaf840871cc0d5cef.patch"; 49 sha256 = "sha256-vozBK7g2dLxx9din/R2vU28Mm+LoGAO/BmQlt/ShmEo="; 50 }) 51 ]; 52 53 postPatch = '' 54 substituteInPlace setup.py \ 55 --replace '"unittest2",' "" 56 ''; 57 58 pythonImportsCheck = [ 59 "batchgenerators" 60 ]; 61 62 meta = with lib; { 63 description = "2D and 3D image data augmentation for deep learning"; 64 homepage = "https://github.com/MIC-DKFZ/batchgenerators"; 65 license = licenses.asl20; 66 maintainers = with maintainers; [ bcdarwin ]; 67 }; 68}