From b869a4836c19b8119ecae294f5be3b3bb157f80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 31 Aug 2021 20:21:41 +0200 Subject: [PATCH] python39Packages.pyocr: switch to pytestCheckHook, format, fix setuptools not finding version --- .../python-modules/pyocr/default.nix | 41 +++++++++++++------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/pyocr/default.nix b/pkgs/development/python-modules/pyocr/default.nix index 099c9e237111..df20d3bb6c47 100644 --- a/pkgs/development/python-modules/pyocr/default.nix +++ b/pkgs/development/python-modules/pyocr/default.nix @@ -1,6 +1,16 @@ -{ lib, fetchFromGitLab, buildPythonPackage, pillow, setuptools-scm, -setuptools-scm-git-archive , tesseract, cuneiform, isPy3k, substituteAll, -pytest, tox }: +{ lib +, fetchFromGitLab +, buildPythonPackage +, pillow +, setuptools-scm +, setuptools-scm-git-archive +, tesseract +, cuneiform +, isPy3k +, substituteAll +, pytestCheckHook +, tox +}: buildPythonPackage rec { pname = "pyocr"; @@ -17,20 +27,25 @@ buildPythonPackage rec { sha256 = "09ab86bmizpv94w3mdvdqkjyyvk1vafw3jqhkiw5xx7p180xn3il"; }; - patches = [ (substituteAll { - src = ./paths.patch; - inherit cuneiform tesseract; - }) + patches = [ + (substituteAll { + src = ./paths.patch; + inherit cuneiform tesseract; + }) ]; - buildInputs = [ setuptools-scm setuptools-scm-git-archive ]; - propagatedBuildInputs = [ pillow ]; - checkInputs = [ pytest tox ]; - checkPhase = "pytest"; + SETUPTOOLS_SCM_PRETEND_VERSION = version; - meta = { + buildInputs = [ setuptools-scm setuptools-scm-git-archive ]; + + propagatedBuildInputs = [ pillow ]; + + checkInputs = [ pytestCheckHook ]; + + meta = with lib; { inherit (src.meta) homepage; description = "A Python wrapper for Tesseract and Cuneiform"; - license = lib.licenses.gpl3Plus; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ]; }; }