pythonPackages.imgaug: 0.3.0-patch
This commit is contained in:
parent
ddcaa0cd2f
commit
f412725449
@ -1,30 +1,55 @@
|
|||||||
{ stdenv, buildPythonPackage, fetchPypi, numpy, scipy, scikitimage, opencv3, six }:
|
{ buildPythonPackage
|
||||||
|
, fetchurl
|
||||||
|
, imageio
|
||||||
|
, numpy
|
||||||
|
, opencv3
|
||||||
|
, pytest
|
||||||
|
, scikitimage
|
||||||
|
, scipy
|
||||||
|
, shapely
|
||||||
|
, six
|
||||||
|
, stdenv
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "imgaug";
|
pname = "imgaug";
|
||||||
version = "0.3.0";
|
version = "0.3.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchurl {
|
||||||
inherit pname version;
|
url = "https://github.com/aleju/imgaug/archive/c3d99a420efc45652a1264920dc20378a54b1325.zip";
|
||||||
sha256 = "e1354d41921f1b306b50c5141b4870f17e81b531cae2f5c3093da9dc4dcb3cf4";
|
sha256 = "sha256:174nvhyhdn3vz0i34rqmkn26840j3mnfr55cvv5bdf9l4y9bbjq2";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 = [
|
propagatedBuildInputs = [
|
||||||
|
imageio
|
||||||
numpy
|
numpy
|
||||||
scipy
|
|
||||||
scikitimage
|
|
||||||
opencv3
|
opencv3
|
||||||
|
scikitimage
|
||||||
|
scipy
|
||||||
|
shapely
|
||||||
six
|
six
|
||||||
];
|
];
|
||||||
|
|
||||||
# disable tests when there are no tests in the PyPI archive
|
checkPhase = ''
|
||||||
doCheck = false;
|
pytest ./test
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs = [ opencv3 pytest ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://github.com/aleju/imgaug;
|
homepage = https://github.com/aleju/imgaug;
|
||||||
description = "Image augmentation for machine learning experiments";
|
description = "Image augmentation for machine learning experiments";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ cmcdragonkai ];
|
maintainers = with maintainers; [ cmcdragonkai rakesh4g ];
|
||||||
broken = true; # opencv-python bindings aren't available yet, and look non-trivial
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user