diff mbox

gnu: Update python2-qrcode (refactored)

Message ID ec3a78bc58f902659cd36fa14e5937f5@d4n1.org
State New
Headers show

Commit Message

Daniel Pimentel June 16, 2016, 12:14 p.m. UTC
Add python2-qrcode

Comments

Ben Woodcroft June 16, 2016, 10:08 p.m. UTC | #1
Hi Daniel,

Thanks for the patch.

> Subject: [PATCH 3/3] gnu: Add python2-qrcode

nitpicks: A full stop should be added at the end, and the following 
changelog-style line should be added:

* gnu/packages/python.scm (python2-qrcode): New variable.

There was also some trailing whitespace in the patch.

> +
> +(define-public python2-qrcode
> +  (package
> +    (name "python2-qrcode")
> +    (version "5.1")

5.3 is the newest version, is there a reason to stick with this older 
version?

> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> + "https://pypi.python.org/packages/source/q/qrcode/qrcode-"
> +                    version ".tar.gz"))

I think Andreas' comment still applies here i.e. better to use 'pypi-url'.

> +              (sha256
> +               (base32
> + "0skzrvhjnnacrz52jml4i050vdx5lfcd3np172srxjaghdgfxg9k"))))
> +    (build-system python-build-system)
> +    (inputs
> +     `(("python2-setuptools" ,python2-setuptools)

Can we make this a native-input ?

> +       ("python2-pillow" ,python2-pillow)

I agree this should be an input, even if it is optional. However, it 
does not get included in the .pth file, does this mean that it is not 
available as usual in an environment. Would you mind please checking this?

> +       ("python2-six" ,python2-six)))
> +    (arguments
> +     `(#:python ,python-2)) ; only Python 2.7 is supported
> +    (home-page "https://pypi.python.org/pypi/qrcode")
> +    (synopsis "Python library to generate QR Codes")
> +    (description
> +     "Python library that uses image libraries, Python Imaging 
> Library (PIL)
> +by default, to generate QR Codes.")

How about "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 license:expat)))

This should be bsd-3 I think.

Thanks,
ben
diff mbox

Patch

From 73789bcc6b019f8688881361b12ca451282efe43 Mon Sep 17 00:00:00 2001
From: Daniel Pimentel <d4n1@d4n1.org>
Date: Thu, 16 Jun 2016 09:13:55 -0300
Subject: [PATCH 3/3] gnu: Add python2-qrcode

---
 gnu/packages/python.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0d1391b..db65ffc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9269,3 +9269,29 @@  new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
      "This module implements the password-based key derivation function, 
 PBKDF2, specified in RSA PKCS#5 v2.0.")
     (license license:expat)))
+
+(define-public python2-qrcode
+  (package
+    (name "python2-qrcode")
+    (version "5.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://pypi.python.org/packages/source/q/qrcode/qrcode-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "0skzrvhjnnacrz52jml4i050vdx5lfcd3np172srxjaghdgfxg9k"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python2-setuptools" ,python2-setuptools)
+       ("python2-pillow" ,python2-pillow)
+       ("python2-six" ,python2-six)))    
+    (arguments
+     `(#:python ,python-2)) ; only Python 2.7 is supported
+    (home-page "https://pypi.python.org/pypi/qrcode")
+    (synopsis "Python library to generate QR Codes")
+    (description
+     "Python library that uses image libraries, Python Imaging Library (PIL) 
+by default, to generate QR Codes.")
+    (license license:expat)))
-- 
2.7.4