python3Packages.imgaug: 0.3.0 -> 0.4.0

This commit is contained in:
Jonathan Ringer 2020-02-12 21:39:40 -08:00 committed by Jon
parent 18d9cc22c6
commit 9ad3ee23c0

View File

@ -1,5 +1,5 @@
{ buildPythonPackage { buildPythonPackage
, fetchurl , fetchFromGitHub
, imageio , imageio
, numpy , numpy
, opencv3 , opencv3
@ -13,18 +13,20 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "imgaug"; pname = "imgaug";
version = "0.3.0"; version = "0.4.0";
src = fetchurl { src = fetchFromGitHub {
url = "https://github.com/aleju/imgaug/archive/c3d99a420efc45652a1264920dc20378a54b1325.zip"; owner = "aleju";
sha256 = "sha256:174nvhyhdn3vz0i34rqmkn26840j3mnfr55cvv5bdf9l4y9bbjq2"; repo = "imgaug";
rev = version;
sha256 = "17hbxndxphk3bfnq35y805adrfa6gnm5x7grjxbwdw4kqmbbqzah";
}; };
postPatch = '' postPatch = ''
substituteInPlace requirements.txt \ substituteInPlace requirements.txt \
--replace "opencv-python-headless" "" --replace "opencv-python-headless" ""
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "opencv-python-headless" "" --replace "opencv-python-headless" ""
substituteInPlace pytest.ini \ substituteInPlace pytest.ini \
--replace "--xdoctest --xdoctest-global-exec=\"import imgaug as ia\nfrom imgaug import augmenters as iaa\"" "" --replace "--xdoctest --xdoctest-global-exec=\"import imgaug as ia\nfrom imgaug import augmenters as iaa\"" ""
''; '';
@ -39,8 +41,9 @@ buildPythonPackage rec {
six six
]; ];
# augmenters requires a significant increase in packages requires
checkPhase = '' checkPhase = ''
pytest ./test pytest ./test --ignore=test/augmenters
''; '';
checkInputs = [ opencv3 pytest ]; checkInputs = [ opencv3 pytest ];