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

79 lines
1.7 KiB
Nix
Raw Normal View History

2019-12-20 06:17:01 +01:00
{ buildPythonPackage
2020-02-13 06:39:40 +01:00
, fetchFromGitHub
2019-12-20 06:17:01 +01:00
, imageio
2020-02-15 06:52:22 +01:00
, imagecorruptions
2019-12-20 06:17:01 +01:00
, numpy
, opencv3
2021-06-07 12:43:09 +02:00
, pytestCheckHook
2019-12-20 06:17:01 +01:00
, scikitimage
, scipy
, shapely
, six
, lib
2019-12-20 06:17:01 +01:00
}:
buildPythonPackage rec {
pname = "imgaug";
2020-02-13 06:39:40 +01:00
version = "0.4.0";
2020-02-13 06:39:40 +01:00
src = fetchFromGitHub {
owner = "aleju";
repo = "imgaug";
rev = version;
sha256 = "17hbxndxphk3bfnq35y805adrfa6gnm5x7grjxbwdw4kqmbbqzah";
};
2019-12-20 06:17:01 +01:00
postPatch = ''
substituteInPlace requirements.txt \
--replace "opencv-python-headless" ""
substituteInPlace setup.py \
2020-02-13 06:39:40 +01:00
--replace "opencv-python-headless" ""
2019-12-20 06:17:01 +01:00
substituteInPlace pytest.ini \
--replace "--xdoctest --xdoctest-global-exec=\"import imgaug as ia\nfrom imgaug import augmenters as iaa\"" ""
'';
propagatedBuildInputs = [
2019-12-20 06:17:01 +01:00
imageio
2020-02-15 06:52:22 +01:00
imagecorruptions
numpy
opencv3
2019-12-20 06:17:01 +01:00
scikitimage
scipy
shapely
six
];
2021-06-07 12:43:09 +02:00
checkInputs = [
opencv3
pytestCheckHook
];
disabledTests = [
# Tests are outdated
"test_quokka_segmentation_map"
"test_pool"
"test_avg_pool"
"test_max_pool"
"test_min_pool"
"est_median_pool"
"test_alpha_is_080"
"test_face_and_lines_at_half_visibility"
"test_polygon_fully_inside_image__no_rectangular_shape"
];
disabledTestPaths = [
# TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
"test/augmenters/test_pooling.py"
];
2019-12-20 06:17:01 +01:00
2021-06-07 12:43:09 +02:00
pythonImportsCheck = [ "imgaug" ];
meta = with lib; {
homepage = "https://github.com/aleju/imgaug";
description = "Image augmentation for machine learning experiments";
license = licenses.mit;
2019-12-20 06:17:01 +01:00
maintainers = with maintainers; [ cmcdragonkai rakesh4g ];
platforms = platforms.linux;
};
}