Hi Daniel,

On 18/06/16 09:40, Daniel Pimentel wrote:
* gnu/packages/python.scm (python2-qrcode): New variable.

Thanks for the updated patch. In future would you mind sending the whole patch like as attached? It just makes things easier - thanks.

I noticed that the sha256 did not change, so I changed the source field. But perhaps more problematically, I couldn't get the example in the README to work. Do you know if this is a problem with the library itself or the packing of it?

$ ./pre-inst-env guix environment --pure --ad-hoc python2-qrcode python@2
...
$ python
Python 2.7.10 (default, Jan  1 1970, 00:00:01)
[GCC 4.9.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import qrcode
img = qrcode.make('Some data here')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
File "/gnu/store/n205hrfqrc0mp1csbh44mxpm19hrggld-profile/lib/python2.7/site-packages/qrcode-5.3-py2.7.egg/qrcode/main.py", line 11, in make File "/gnu/store/n205hrfqrc0mp1csbh44mxpm19hrggld-profile/lib/python2.7/site-packages/qrcode-5.3-py2.7.egg/qrcode/main.py", line 271, in make_image File "/gnu/store/n205hrfqrc0mp1csbh44mxpm19hrggld-profile/lib/python2.7/site-packages/qrcode-5.3-py2.7.egg/qrcode/image/pil.py", line 8, in <module>
ImportError: No module named Image


>From 63500efe49a1a9bea44857471e094bdff38fdc45 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrust...@gmail.com>
Date: Sat, 18 Jun 2016 15:04:01 +1000
Subject: [PATCH] gnu: Add python2-qrcode.

* gnu/packages/python.scm (python2-qrcode): New variable.
---
 gnu/packages/python.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b294814..26fef4b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9281,3 +9281,34 @@ It supports both the original 1.0 specification, as well as the
 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
 etc.")
     (license asl2.0)))
+
+(define-public python2-qrcode
+  (package
+    (name "python2-qrcode")
+    (version "5.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "https://pypi.python.org/packages/";
+         "87/16/99038537dc58c87b136779c0e06d46887ff5104eb8c64989aac1ec8cba81"
+         "/qrcode-" version ".tar.gz"))
+      (sha256
+        (base32
+          "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python2-pillow" ,python2-pillow)
+       ("python2-six" ,python2-six)))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)))
+    (arguments
+     `(#:python ,python-2))
+    (home-page "https://pypi.python.org/pypi/qrcode";)
+    (synopsis "Python library to generate QR Codes")
+    (description
+     "@code{qrcode} is a library which can be used to generate Quick
+Response (QR) images.  It is recommended that the pillow library be used to
+generate images, though the default Python imaging library can also be used.")
+    (license bsd-3)))
-- 
2.7.4

Reply via email to