nixpkgs/pkgs/development/python-modules/imgaug/default.nix

56 lines
1.2 KiB
Nix
Raw Normal View History

2019-12-20 05:17:01 +00:00
{ buildPythonPackage
, fetchurl
, imageio
, numpy
, opencv3
, pytest
, scikitimage
, scipy
, shapely
, six
, stdenv
}:
buildPythonPackage rec {
pname = "imgaug";
2019-10-24 06:47:35 +00:00
version = "0.3.0";
2019-12-20 05:17:01 +00:00
src = fetchurl {
url = "https://github.com/aleju/imgaug/archive/c3d99a420efc45652a1264920dc20378a54b1325.zip";
sha256 = "sha256:174nvhyhdn3vz0i34rqmkn26840j3mnfr55cvv5bdf9l4y9bbjq2";
};
2019-12-20 05:17:01 +00:00
postPatch = ''
substituteInPlace requirements.txt \
--replace "opencv-python-headless" ""
substituteInPlace setup.py \
--replace "opencv-python-headless" ""
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
numpy
opencv3
2019-12-20 05:17:01 +00:00
scikitimage
scipy
shapely
six
];
2019-12-20 05:17:01 +00:00
checkPhase = ''
pytest ./test
'';
checkInputs = [ opencv3 pytest ];
meta = with stdenv.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;
};
}