all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Pimentel <d4n1@d4n1.org>
To: Ben Woodcroft <b.woodcroft@uq.edu.au>
Cc: guix-devel@gnu.org
Subject: [PATCH] gnu: Add python2-qrcode
Date: Thu, 23 Jun 2016 13:41:16 -0300	[thread overview]
Message-ID: <046cc7d49648b5b1977cbebffa29ac97@d4n1.org> (raw)
In-Reply-To: <b1592b86dc82d48e3a5eb21798e8fabf@d4n1.org>

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

In attach a full patch. Update URI with Pypi.

I tried:
./pre-inst-env guix environment --pure --ad-hoc python2-qrcode python@2
$ qr "Guix" > guix-qrcode.png

It's work.

But whent import by python shell using:
$ python
> import qrcode
> img = qrcode.make('Some data here')

Not work, probably problem with Pillow (PIL fork).

-- 
Daniel Pimentel (aka d4n1)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-add-python2-qrcode.patch --]
[-- Type: text/x-diff; name=0002-gnu-add-python2-qrcode.patch, Size: 1570 bytes --]

From c2a15eb90e42e2020d38161f51bca1c800d12139 Mon Sep 17 00:00:00 2001
From: Daniel Pimentel <d4n1@d4n1.org>
Date: Thu, 23 Jun 2016 13:34:54 -0300
Subject: [PATCH 2/2] gnu: add python2-qrcode * gnu/packages/python.scm: add
 new package.

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index cf4ef3c..529da2c 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9315,3 +9315,30 @@ etc.")
      "A module that implements the password-based key derivation 
 function PBKDF2.")
     (license license:expat)))
+
+(define-public python2-qrcode
+  (package
+    (name "python2-qrcode")
+    (version "5.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "qrcode" version))
+       (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	other threads:[~2016-06-23 16:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 19:26 [PATCH] gnu: Add python2-qrcode Daniel Pimentel
2016-06-14 19:51 ` ng0
2016-06-14 20:00   ` [PATCH] gnu: Update python2-qrcode Daniel Pimentel
2016-06-14 21:12     ` ng0
2016-06-14 21:48       ` d4n1
2016-06-15 13:12         ` Andreas Enge
2016-06-16 12:14     ` [PATCH] gnu: Update python2-qrcode (refactored) Daniel Pimentel
2016-06-16 22:08       ` Ben Woodcroft
2016-06-17 23:40         ` [PATCH 2/2] gnu: Update python2-qrcode Daniel Pimentel
2016-06-18  5:31           ` Ben Woodcroft
2016-06-23 16:14             ` Daniel Pimentel
2016-06-23 16:41               ` Daniel Pimentel [this message]
2016-06-23 23:45                 ` [PATCH] gnu: Add python2-qrcode Ben Woodcroft
2016-06-17 23:47       ` [PATCH 2/2] gnu: Update python2-qrcode Daniel Pimentel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=046cc7d49648b5b1977cbebffa29ac97@d4n1.org \
    --to=d4n1@d4n1.org \
    --cc=b.woodcroft@uq.edu.au \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.