From 2613f870fbcb62e25cf936e294faa13e580154dc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 9 Jun 2023 23:13:04 +0200 Subject: [PATCH] python311Packages.easyocr: add format - disable on unsupported Python releases --- .../python-modules/easyocr/default.nix | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/easyocr/default.nix b/pkgs/development/python-modules/easyocr/default.nix index 4fd0c4de8eab..d086ea7c643c 100644 --- a/pkgs/development/python-modules/easyocr/default.nix +++ b/pkgs/development/python-modules/easyocr/default.nix @@ -3,22 +3,26 @@ , fetchFromGitHub , hdf5 , numpy +, onnx , opencv3 , pillow , pyaml , pyclipper , python-bidi -, torch +, pythonOlder , scikit-image , scipy , shapely +, torch , torchvision -, onnx }: buildPythonPackage rec { pname = "easyocr"; version = "1.6.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "JaidedAI"; @@ -34,23 +38,27 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ - scikit-image hdf5 - python-bidi numpy opencv3 - torchvision pillow pyaml pyclipper - torch + python-bidi + scikit-image scipy shapely + torch + torchvision ]; - nativeCheckInputs = [ onnx ]; + nativeCheckInputs = [ + onnx + ]; - pythonImportsCheck = [ "easyocr" ]; + pythonImportsCheck = [ + "easyocr" + ]; meta = with lib; { description = "Ready-to-use OCR with 80+ supported languages and all popular writing scripts";