Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / imgaug / default.nix
blob343c7869a6c131c94ab89515b581d8bb287134bf
1 { buildPythonPackage
2 , fetchFromGitHub
3 , imageio
4 , imagecorruptions
5 , numpy
6 , opencv3
7 , pytest
8 , scikitimage
9 , scipy
10 , shapely
11 , six
12 , lib
15 buildPythonPackage rec {
16   pname = "imgaug";
17   version = "0.4.0";
19   src = fetchFromGitHub {
20     owner = "aleju";
21     repo = "imgaug";
22     rev = version;
23     sha256 = "17hbxndxphk3bfnq35y805adrfa6gnm5x7grjxbwdw4kqmbbqzah";
24   };
26   postPatch = ''
27     substituteInPlace requirements.txt \
28       --replace "opencv-python-headless" ""
29     substituteInPlace setup.py \
30       --replace "opencv-python-headless" ""
31     substituteInPlace pytest.ini \
32       --replace "--xdoctest --xdoctest-global-exec=\"import imgaug as ia\nfrom imgaug import augmenters as iaa\"" ""
33   '';
35   propagatedBuildInputs = [
36     imageio
37     imagecorruptions
38     numpy
39     opencv3
40     scikitimage
41     scipy
42     shapely
43     six
44   ];
46   checkPhase = ''
47      pytest ./test
48   '';
50   checkInputs = [ opencv3 pytest ];
52   meta = with lib; {
53     homepage = "https://github.com/aleju/imgaug";
54     description = "Image augmentation for machine learning experiments";
55     license = licenses.mit;
56     maintainers = with maintainers; [ cmcdragonkai rakesh4g ];
57     platforms = platforms.linux;
58   };