summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-07-01 17:25:10 -0400
committerLeo Famulari <leo@famulari.name>2016-07-03 22:24:44 -0400
commitd8fa9cf7f4173b1b30adc1a7b75f7dd46218c424 (patch)
tree7650581b6cd08967cf2ddbe4a7b34d70fb545deb /gnu
parent2d02a7789af1e4ab147959d053a001f7c62147ea (diff)
downloadguix-patches-d8fa9cf7f4173b1b30adc1a7b75f7dd46218c424.tar
guix-patches-d8fa9cf7f4173b1b30adc1a7b75f7dd46218c424.tar.gz
gnu: Add python-imagesize.
* gnu/packages/python.scm (python-imagesize, python2-imagesize): New variables.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python.scm26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 8bba7ca256..c9c782de13 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9674,3 +9674,29 @@ implementation for Python.")
(native-inputs
`(("python2-ipaddress" ,python2-ipaddress)
,@(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))))))