From c84e7dc368bf71006f8eb19b4fd35c1b6b0a38e2 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 20 May 2022 13:17:47 +0200 Subject: [PATCH 1/2] python3Packages.pytesseract: 0.3.9 -> 0.3.10, enable tests ChangeLog: https://github.com/madmaze/pytesseract/releases/tag/v0.3.10 Not published to PyPI, so switching to the GitHub source here. --- .../python-modules/pytesseract/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pytesseract/default.nix b/pkgs/development/python-modules/pytesseract/default.nix index 13cfdaea214e..bd5e1a223eb8 100644 --- a/pkgs/development/python-modules/pytesseract/default.nix +++ b/pkgs/development/python-modules/pytesseract/default.nix @@ -1,13 +1,17 @@ -{ buildPythonPackage, fetchPypi, lib, packaging, pillow, tesseract, substituteAll }: +{ buildPythonPackage, fetchFromGitHub, lib, packaging, pillow, tesseract, substituteAll +, pytestCheckHook +}: buildPythonPackage rec { pname = "pytesseract"; - version = "0.3.9"; + version = "0.3.10"; format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-fiuvx/SNG7cUQ85GM6VvXiGSWpjyIKNsM2KX7c0ZVtA="; + src = fetchFromGitHub { + repo = pname; + owner = "madmaze"; + rev = "v${version}"; + sha256 = "sha256-CyKXtaIE/8iPLqi0GHVUgTeJDYZyWBjkRvOKJJKCxZo="; }; patches = [ @@ -26,8 +30,7 @@ buildPythonPackage rec { pillow ]; - # the package doesn't have any tests. - doCheck = false; + checkInputs = [ pytestCheckHook ]; meta = with lib; { homepage = "https://pypi.org/project/pytesseract/"; From 3b9965c34abf3e26d1e5a7a17cd5d9d0297c8ed0 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 21 May 2022 13:25:01 +0200 Subject: [PATCH 2/2] python3Packages.pytesseract: update attr ordering Co-authored-by: Sandro --- pkgs/development/python-modules/pytesseract/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pytesseract/default.nix b/pkgs/development/python-modules/pytesseract/default.nix index bd5e1a223eb8..c99e6acbfbfe 100644 --- a/pkgs/development/python-modules/pytesseract/default.nix +++ b/pkgs/development/python-modules/pytesseract/default.nix @@ -8,8 +8,8 @@ buildPythonPackage rec { format = "pyproject"; src = fetchFromGitHub { - repo = pname; owner = "madmaze"; + repo = pname; rev = "v${version}"; sha256 = "sha256-CyKXtaIE/8iPLqi0GHVUgTeJDYZyWBjkRvOKJJKCxZo="; };