summaryrefslogtreecommitdiff
path: root/dev-python/qrcode
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/qrcode
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/qrcode')
-rw-r--r--dev-python/qrcode/Manifest4
-rw-r--r--dev-python/qrcode/files/qrcode-5.1-unicode.patch34
-rw-r--r--dev-python/qrcode/metadata.xml11
-rw-r--r--dev-python/qrcode/qrcode-5.1-r1.ebuild41
4 files changed, 90 insertions, 0 deletions
diff --git a/dev-python/qrcode/Manifest b/dev-python/qrcode/Manifest
new file mode 100644
index 000000000000..87fa0e755dca
--- /dev/null
+++ b/dev-python/qrcode/Manifest
@@ -0,0 +1,4 @@
+AUX qrcode-5.1-unicode.patch 961 BLAKE2B f0fffaab08a6e20bf2897b4130f25b1639992a4184114f5ede1833cbbf7e8d9f7aa0fa9ae631d0af8d84ac4c372d96e4f0809fcba6168c2bd6d23a7c39e8baa2 SHA512 f75feb86c8796e73d7089fba8e0c464929452c4be24b2829fd231bd210d2152710529aa3e3266bb88453ee4f69fed2a1f6cdf337a8ff44a345f3f7d56c969af0
+DIST qrcode-5.1.tar.gz 22259 BLAKE2B 1aad710fbfdaa1c1be505038ceedbf02de8bcb2a37ead59265ff03af63b96d6cd740672cb2bd3a8f3b67eb981ed791cf2d53050c02d1499e6efcf1fcce2903c1 SHA512 67a7bb51fe2386f3b1ac0b799d3850d3ca4f61286fdc809654df3f5a1071b503707a9a3e82e595b7611dd9d7b7e74b36e19b86942fb5ad94c256cd7ca9aa02f3
+EBUILD qrcode-5.1-r1.ebuild 934 BLAKE2B 3ff36fc6f7349970aeac96bfeffb10670e1ad4faf29fd033965bc67fb9c8d551a49053c2e0246d93b1db357bcad7f339262792245edd5c0dec1d545866c0157f SHA512 0c9239d94f8deb5bc5e0425f9a4fc1419283a471e35298e301fd913f998fd7b9c62991b22a9d4f16622ba2bb14b7e3d266fad1f3cefc3828e69414008e1cacc0
+MISC metadata.xml 309 BLAKE2B 1ddae27e1f2ec0dc7c656238d9895afa6034ef205f42bea031b29cc69191b074e29f4049ec8103701cd916e17dae25e26d25d4e61f123d53fc0b0f6321c8d857 SHA512 65fa150581939d81a62bcd84b25e733b5cbf394ee6b201aaf7f64b22eeb75a3466ae0a6e1e230a8bb8f08b678544660e4382eb85fe55754bd64014a3c7b35aec
diff --git a/dev-python/qrcode/files/qrcode-5.1-unicode.patch b/dev-python/qrcode/files/qrcode-5.1-unicode.patch
new file mode 100644
index 000000000000..2d628c68e5a6
--- /dev/null
+++ b/dev-python/qrcode/files/qrcode-5.1-unicode.patch
@@ -0,0 +1,34 @@
+From 0a9f17d3afb0ff01f68c2276ec0844d329a6add9 Mon Sep 17 00:00:00 2001
+From: Chris Beaven <smileychris@gmail.com>
+Date: Mon, 3 Nov 2014 10:56:14 -0600
+Subject: [PATCH] Fix script piping to stdout in Python 3
+
+Fixes #66
+---
+ qrcode/console_scripts.py | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/qrcode/console_scripts.py b/qrcode/console_scripts.py
+index d215993..c51463b 100755
+--- a/qrcode/console_scripts.py
++++ b/qrcode/console_scripts.py
+@@ -57,7 +57,18 @@ def main(args=sys.argv[1:]):
+ return
+
+ img = qr.make_image(image_factory=image_factory)
+- img.save(sys.stdout)
++
++ sys.stdout.flush()
++ if sys.version_info[0] >= 3:
++ buff = sys.stdout.buffer
++ else:
++ if sys.platform == 'win32':
++ import os
++ import msvcrt
++ msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
++ buff = sys.stdout
++
++ img.save(buff)
+
+
+ if __name__ == "__main__":
diff --git a/dev-python/qrcode/metadata.xml b/dev-python/qrcode/metadata.xml
new file mode 100644
index 000000000000..be26e2b2cafe
--- /dev/null
+++ b/dev-python/qrcode/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">qrcode</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/qrcode/qrcode-5.1-r1.ebuild b/dev-python/qrcode/qrcode-5.1-r1.ebuild
new file mode 100644
index 000000000000..144590d77c3b
--- /dev/null
+++ b/dev-python/qrcode/qrcode-5.1-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1
+
+DESCRIPTION="QR Code generator on top of PIL"
+HOMEPAGE="https://pypi.org/project/qrcode/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+# optional deps:
+# - pillow and lxml for svg backend, set as hard deps
+RDEPEND="
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( ${RDEPEND}
+ $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-unicode.patch
+)
+
+python_test() {
+ "${PYTHON}" -m unittest discover > /dev/tty | less || die "Testing failed with ${EPYTHON}"
+}
+
+src_install() {
+ distutils-r1_src_install
+ doman doc/qr.1
+}