From 99e02748ab5374266677f47a409749475b4ef8fc Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Mon, 24 May 2021 18:10:18 -0300 Subject: [PATCH 1/6] gnu: Add python-imagehash. * gnu/packages/python-xyz.scm (python-imagehash): New variable. --- gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ec4209108f..c6d8fb1eea 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13018,6 +13018,47 @@ The API is as much as possible the similar to jQuery. pyquery uses lxml for fast xml and html manipulation.") (license license:bsd-3))) +(define-public python-imagehash + (package + (name "python-imagehash") + (version "4.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ImageHash" version)) + (sha256 + (base32 "0kgiksjggw2warfz5d04fr3iph47vwxcb8jrlj41ljkhrc3ahsd9")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest"))))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-pillow" ,python-pillow) + ("python-pywavelets" ,python-pywavelets) + ("python-scipy" ,python-scipy) + ("python-six" ,python-six))) + (home-page "https://github.com/JohannesBuchner/imagehash") + (synopsis "Image hashing library") + (description "ImageHash is an Image hashing library. It supports: + +@itemize +@item Average hashing +@item Perceptual hashing +@item Difference hashing +@item Wavelet hashing +@item HSV color hashing (colorhash) +@item Crop-resistant hashing +@end itemize") + (license license:bsd-2))) + (define-public python-anyjson (package (name "python-anyjson") -- 2.32.0