3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/imgaug/default.nix

60 lines
1.2 KiB
Nix
Raw Normal View History

2019-12-20 05:17:01 +00:00
{ buildPythonPackage
2020-02-13 05:39:40 +00:00
, fetchFromGitHub
2019-12-20 05:17:01 +00:00
, imageio
2020-02-15 05:52:22 +00:00
, imagecorruptions
2019-12-20 05:17:01 +00:00
, numpy
, opencv3
, pytest
, scikitimage
, scipy
, shapely
, six
, lib, stdenv
2019-12-20 05:17:01 +00:00
}:
buildPythonPackage rec {
pname = "imgaug";
2020-02-13 05:39:40 +00:00
version = "0.4.0";
2020-02-13 05:39:40 +00:00
src = fetchFromGitHub {
owner = "aleju";
repo = "imgaug";
rev = version;
sha256 = "17hbxndxphk3bfnq35y805adrfa6gnm5x7grjxbwdw4kqmbbqzah";
};
2019-12-20 05:17:01 +00:00
postPatch = ''
substituteInPlace requirements.txt \
--replace "opencv-python-headless" ""
substituteInPlace setup.py \
2020-02-13 05:39:40 +00:00
--replace "opencv-python-headless" ""
2019-12-20 05:17:01 +00:00
substituteInPlace pytest.ini \
--replace "--xdoctest --xdoctest-global-exec=\"import imgaug as ia\nfrom imgaug import augmenters as iaa\"" ""
'';
propagatedBuildInputs = [
2019-12-20 05:17:01 +00:00
imageio
2020-02-15 05:52:22 +00:00
imagecorruptions
numpy
opencv3
2019-12-20 05:17:01 +00:00
scikitimage
scipy
shapely
six
];
2019-12-20 05:17:01 +00:00
checkPhase = ''
2020-02-15 05:52:22 +00:00
pytest ./test
2019-12-20 05:17:01 +00:00
'';
checkInputs = [ opencv3 pytest ];
meta = with lib; {
homepage = "https://github.com/aleju/imgaug";
description = "Image augmentation for machine learning experiments";
license = licenses.mit;
2019-12-20 05:17:01 +00:00
maintainers = with maintainers; [ cmcdragonkai rakesh4g ];
platforms = platforms.linux;
};
}