guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49207] [PATCH v2 1/5] gnu: Add python-imagehash.


From: Vinicius Monego
Subject: [bug#49207] [PATCH v2 1/5] gnu: Add python-imagehash.
Date: Fri, 9 Jun 2023 14:58:50 +0000

* gnu/packages/digest.scm (python-imagehash): New variable.
---
 gnu/packages/digest.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/digest.scm b/gnu/packages/digest.scm
index 481771804b..405c1769d3 100644
--- a/gnu/packages/digest.scm
+++ b/gnu/packages/digest.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2017, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2021 Ryan Prior <rprior@protonmail.com>
 ;;; Copyright © 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2023 Vinicius Monego <monego@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,7 +30,10 @@ (define-module (gnu packages digest)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (guix utils)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-science)
+  #:use-module (gnu packages python-xyz)
   #:use-module (ice-9 match))
 
 (define-public wyhash
@@ -129,3 +133,34 @@ (define-public python-xxhash
     (description "This package provides Python bindings for the xxHash hash
 algorithm.")
     (license license:bsd-3)))
+
+(define-public python-imagehash
+  (package
+    (name "python-imagehash")
+    (version "4.3.1")
+    (source
+     (origin
+       (method git-fetch) ;no tests in PyPI
+       (uri (git-reference
+             (url "https://github.com/JohannesBuchner/imagehash";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1lw9lxzrzy9s5v3xc35vmh97hlyavnla087fp19k77va6v8vbjjf"))))
+    (build-system pyproject-build-system)
+    (native-inputs (list python-pytest))
+    (propagated-inputs (list python-numpy python-pillow python-pywavelets
+                             python-scipy))
+    (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)))
-- 
2.34.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]