From 49b8dbf0e6f654a4182fcda54cb888d1579ed599 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 10 Jul 2023 22:27:03 -0400 Subject: [PATCH 1/2] python310Packages.mask-rcnn: remove --- .../python-modules/mask-rcnn/default.nix | 68 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 3 files changed, 1 insertion(+), 70 deletions(-) delete mode 100644 pkgs/development/python-modules/mask-rcnn/default.nix diff --git a/pkgs/development/python-modules/mask-rcnn/default.nix b/pkgs/development/python-modules/mask-rcnn/default.nix deleted file mode 100644 index 471b1fa61d42..000000000000 --- a/pkgs/development/python-modules/mask-rcnn/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ buildPythonPackage -, cython -, fetchFromGitHub -, fetchpatch -, h5py -, imgaug -, ipython -, keras -, lib -, matplotlib -, numpy -, opencv3 -, pillow -, scikit-image -, scipy -, tensorflow -}: - -buildPythonPackage rec { - pname = "mask-rcnn"; - version = "2.1"; - - src = fetchFromGitHub { - owner = "matterport"; - repo = "Mask_RCNN"; - rev = "3deaec5d902d16e1daf56b62d5971d428dc920bc"; - sha256 = "13s3q9yh2q9m9vyksd269mww3bni4q2w7q5l419q70ca075qp8zp"; - }; - - patches = [ - # Fix for TF2: - # https://github.com/matterport/Mask_RCNN/issues/2734 - (fetchpatch { - url = "https://github.com/BupyeongHealer/Mask_RCNN_tf_2.x/commit/7957839fe2b248f2f22c7e991ead12068ddc6cfc.diff"; - excludes = [ "mrcnn/model.py" ]; - hash = "sha256-70BGrx6X1uJDA2025f0YTlreT2uB3n35yIzuhf+ypVc="; - }) - ]; - - # Fix for recent Keras - postPatch = '' - substituteInPlace mrcnn/model.py \ - --replace "KE." "KL." - ''; - - nativeBuildInputs = [ cython ]; - - propagatedBuildInputs = [ - h5py - imgaug - ipython - keras - matplotlib - numpy - opencv3 - pillow - scikit-image - scipy - tensorflow - ]; - - meta = with lib; { - description = "Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow"; - homepage = "https://github.com/matterport/Mask_RCNN"; - license = licenses.mit; - maintainers = with maintainers; [ rakesh4g ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 0f4cc1b4072e..e4e0e8ce968b 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -172,6 +172,7 @@ mapAliases ({ Mako = mako; # added 2023-02-19 Markups = markups; # added 2022-02-14 markdownsuperscript = throw "markdownsuperscript is unmaintained, use pymdown-extensions"; # added 2023-06-10 + mask-rcnn = throw "mask-rcnn has been removed as it is unmaintained and its dependency imgaug no longer builds"; # added 2023-07-10 MDP = mdp; # added 2023-02-19 MechanicalSoup = mechanicalsoup; # added 2021-06-01 memcached = python-memcached; # added 2022-05-06 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c38c49c9ada7..6e2e7621339e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6179,8 +6179,6 @@ self: super: with self; { mashumaro = callPackage ../development/python-modules/mashumaro { }; - mask-rcnn = callPackage ../development/python-modules/mask-rcnn { }; - masky = callPackage ../development/python-modules/masky { }; mastodon-py = callPackage ../development/python-modules/mastodon-py { }; From 9f35ab953bc2be03373de3ff08cf629317446f64 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 10 Jul 2023 22:22:59 -0400 Subject: [PATCH 2/2] python310Packages.imgaug: remove In addition to being unmaintained, it has been broken in Nixpkgs for some time due to library incompatibilities. --- .../python-modules/imgaug/default.nix | 84 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 3 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 pkgs/development/python-modules/imgaug/default.nix diff --git a/pkgs/development/python-modules/imgaug/default.nix b/pkgs/development/python-modules/imgaug/default.nix deleted file mode 100644 index c67f7fa5b949..000000000000 --- a/pkgs/development/python-modules/imgaug/default.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ buildPythonPackage -, fetchFromGitHub -, imageio -, imagecorruptions -, numpy -, opencv3 -, pytestCheckHook -, scikit-image -, scipy -, shapely -, six -, lib -}: - -buildPythonPackage rec { - pname = "imgaug"; - version = "0.4.0"; - - src = fetchFromGitHub { - owner = "aleju"; - repo = "imgaug"; - rev = version; - sha256 = "17hbxndxphk3bfnq35y805adrfa6gnm5x7grjxbwdw4kqmbbqzah"; - }; - - 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 - imagecorruptions - numpy - opencv3 - scikit-image - scipy - shapely - six - ]; - - nativeCheckInputs = [ - 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" - # flaky due to timing-based assertions - "test_imap_batches_output_buffer_size" - "test_imap_batches_unordered_output_buffer_size" - ]; - - disabledTestPaths = [ - # TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' - "test/augmenters/test_pooling.py" - ]; - - pythonImportsCheck = [ "imgaug" ]; - - meta = with lib; { - homepage = "https://github.com/aleju/imgaug"; - description = "Image augmentation for machine learning experiments"; - license = licenses.mit; - maintainers = with maintainers; [ cmcdragonkai rakesh4g ]; - platforms = platforms.linux; - # Scikit-image 0.19 update broke API, see https://github.com/scikit-image/scikit-image/releases/tag/v0.19.0 - # and https://github.com/scikit-image/scikit-image/issues/6093 - broken = lib.versionAtLeast scikit-image.version "0.19"; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index e4e0e8ce968b..e6cd378e4be7 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -150,6 +150,7 @@ mapAliases ({ IMAPClient = imapclient; # added 2021-10-28 imdbpy = throw "imdbpy has been renamed to cinemagoer"; # added 2022-08-08 image-match = throw "image-match has been removed because it is no longer maintained"; # added 2023-06-10 + imgaug = throw "imgaug has been removed as it is no longer maintained"; # added 2023-07-10 intreehook = throw "intreehooks has been removed because it is obsolete as a backend-path key was added to PEP 517"; # added 2023-04-11 ipaddress = throw "ipaddress has been removed because it is no longer required since python 2.7."; # added 2022-05-30 influxgraph = throw "influxgraph has been removed because it is no longer maintained"; # added 2022-07-10 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6e2e7621339e..ed05a195e901 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4949,8 +4949,6 @@ self: super: with self; { img2pdf = callPackage ../development/python-modules/img2pdf { }; - imgaug = callPackage ../development/python-modules/imgaug { }; - imgdiff = callPackage ../development/python-modules/imgdiff { }; imgsize = callPackage ../development/python-modules/imgsize { };