diff options
Diffstat (limited to 'pkgs/development/python-modules/pyocr/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pyocr/default.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/pyocr/default.nix b/pkgs/development/python-modules/pyocr/default.nix index fb82fc05300..8dc1ee0f878 100644 --- a/pkgs/development/python-modules/pyocr/default.nix +++ b/pkgs/development/python-modules/pyocr/default.nix @@ -7,12 +7,15 @@ , isPy3k , substituteAll , pytestCheckHook +, setuptools +, setuptools-scm }: buildPythonPackage rec { pname = "pyocr"; - version = "0.8.3"; + version = "0.8.5"; disabled = !isPy3k; + format = "pyproject"; # Don't fetch from PYPI because it doesn't contain tests. src = fetchFromGitLab { @@ -21,7 +24,7 @@ buildPythonPackage rec { owner = "OpenPaperwork"; repo = "pyocr"; rev = version; - hash = "sha256-gIn50H9liQcTb7SzoWnBwm5LTvkr+R+5OPvITls1B/w="; + hash = "sha256-gE0+qbHCwpDdxXFY+4rjVU2FbUSfSVrvrVMcWUk+9FU="; }; patches = [ @@ -31,18 +34,17 @@ buildPythonPackage rec { }) ]; - # see the logic in setup.py - ENABLE_SETUPTOOLS_SCM = "0"; - preConfigure = '' - echo 'version = "${version}"' > src/pyocr/_version.py - ''; + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; propagatedBuildInputs = [ pillow ]; + nativeBuildInputs = [ setuptools setuptools-scm ]; + nativeCheckInputs = [ pytestCheckHook ]; meta = with lib; { inherit (src.meta) homepage; + changelog = "https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/blob/${version}/ChangeLog"; description = "A Python wrapper for Tesseract and Cuneiform"; license = licenses.gpl3Plus; maintainers = with maintainers; [ symphorien ]; |