diff mbox

[1/5] gnu: Add python-imagesize.

Message ID 2c0e767c9d5737542704cbcf13996b12df084ad3.1467421110.git.leo@famulari.name
State New
Headers show

Commit Message

Leo Famulari July 2, 2016, 1:04 a.m. UTC
* gnu/packages/python.scm (python-imagesize, python2-imagesize): New variables.
---
 gnu/packages/python.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

Comments

Ludovic Courtès July 3, 2016, 9:54 p.m. UTC | #1
Leo Famulari <leo@famulari.name> skribis:

> * gnu/packages/python.scm (python-imagesize, python2-imagesize): New variables.

[...]

> +    (description "This Python module returns the size of an image. It supports

Two spaces after period.  :-)

Otherwise LGTM, thanks.

Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 597ca6a..469f1fa 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9693,3 +9693,29 @@  characters, mouse support, and auto suggestions.")
       (native-inputs
        `(("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
+
+(define-public python-imagesize
+  (package
+    (name "python-imagesize")
+    (version "0.7.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "imagesize" version))
+              (sha256
+               (base32
+                "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
+    (build-system python-build-system)
+    (synopsis "Calculate the size of an image")
+    (description "This Python module returns the size of an image. It supports
+the PNG, JPEG, JPEG 2000, and GIF formats.")
+    (home-page "https://github.com/shibukawa/imagesize_py")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-imagesize))))))
+
+(define-public python2-imagesize
+  (let ((base (package-with-python2 (strip-python2-variant python-imagesize))))
+    (package
+      (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))