Patchwork [v2] gnu: Add python-imagesize.

login
register
mail settings
Submitter Danny Milosavljevic
Date Oct. 30, 2016, 6:18 p.m.
Message ID <20161030181835.1709-1-dannym@scratchpost.org>
Download mbox | patch
Permalink /patch/17025/
State New
Headers show

Comments

Danny Milosavljevic - Oct. 30, 2016, 6:18 p.m.
* gnu/packages/python.scm (python-imagesize, python2-imagesize): New variables.
---
 gnu/packages/python.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
Leo Famulari - Oct. 30, 2016, 7:31 p.m.
On Sun, Oct 30, 2016 at 07:18:35PM +0100, Danny Milosavljevic wrote:
> * gnu/packages/python.scm (python-imagesize, python2-imagesize): New variables.

Pushed, thanks for the package!

> ---
>  gnu/packages/python.scm | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 1292a09..b7c9e11 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -11419,3 +11419,30 @@ useful as a validator for JSON data.")
>  
>  (define-public python2-pyev
>    (package-with-python2 python-pyev))
> +
> +(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)
> +    (home-page "https://github.com/shibukawa/imagesize_py")
> +    (synopsis "Gets image size of files in variaous formats in Python")
> +    (description
> +      "This package allows determination of image size from
> +PNG, JPEG, JPEG2000 and GIF files in pure Python.")
> +    (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))))))
>

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 1292a09..b7c9e11 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -11419,3 +11419,30 @@  useful as a validator for JSON data.")
 
 (define-public python2-pyev
   (package-with-python2 python-pyev))
+
+(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)
+    (home-page "https://github.com/shibukawa/imagesize_py")
+    (synopsis "Gets image size of files in variaous formats in Python")
+    (description
+      "This package allows determination of image size from
+PNG, JPEG, JPEG2000 and GIF files in pure Python.")
+    (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))))))