Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.imgaug: 0.3.0-patch #67494

Merged
merged 1 commit into from
Jan 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions pkgs/development/python-modules/imgaug/default.nix
Original file line number Diff line number Diff line change
@@ -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 {
pname = "imgaug";
version = "0.3.0";

src = fetchPypi {
inherit pname version;
sha256 = "e1354d41921f1b306b50c5141b4870f17e81b531cae2f5c3093da9dc4dcb3cf4";
src = fetchurl {
url = "https://github.com/aleju/imgaug/archive/c3d99a420efc45652a1264920dc20378a54b1325.zip";
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 = [
imageio
numpy
scipy
scikitimage
opencv3
scikitimage
scipy
shapely
six
];

# disable tests when there are no tests in the PyPI archive
doCheck = false;
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;
maintainers = with maintainers; [ cmcdragonkai ];
broken = true; # opencv-python bindings aren't available yet, and look non-trivial
maintainers = with maintainers; [ cmcdragonkai rakesh4g ];
Rakesh4G marked this conversation as resolved.
Show resolved Hide resolved
platforms = platforms.linux;
};
}