diff mbox series

[bug#39916] gnu: Add python-blurhash.

Message ID 20200304194531.11367-1-efraim@flashner.co.il
State Accepted
Headers show
Series [bug#39916] gnu: Add python-blurhash. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Efraim Flashner March 4, 2020, 7:45 p.m. UTC
* gnu/packages/python-crypto.scm (python-blurhash): New variable.
---
 gnu/packages/python-crypto.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

Comments

Efraim Flashner March 15, 2020, 6:54 a.m. UTC | #1
Patch pushed
Efraim Flashner March 15, 2020, 6:56 a.m. UTC | #2
Patch pushed.
diff mbox series

Patch

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 834ab5d97d..8d413eda8d 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -784,6 +784,40 @@  key), SSH public key, ASC-encoded OpenPGP key, APK Android application, LDIFF
 file, and more.")
     (license license:gpl3)))
 
+(define-public python-blurhash
+  (package
+    (name "python-blurhash")
+    (version "1.1.4")
+    (source
+      (origin
+        ;; Tests not included in pypi release and releases not tagged in git repo.
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/halcy/blurhash-python")
+               (commit "22e081ef1c24da1bb5c5eaa2c1d6649724deaef8")))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "1qq6mhydlp7q3na4kmaq3871h43wh3pyfyxr4b79bia73wjdylxf"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (delete-file "setup.cfg")
+             (invoke "pytest"))))))
+    (native-inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-pillow" ,python-pillow)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/halcy/blurhash-python")
+    (synopsis
+     "Pure-Python implementation of the blurhash algorithm")
+    (description
+     "Pure-Python implementation of the blurhash algorithm.")
+    (license license:expat)))
+
 (define-public python-ecpy
   (package
     (name "python-ecpy")