summaryrefslogtreecommitdiff
path: root/dev-python/python-termstyle
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/python-termstyle
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/python-termstyle')
-rw-r--r--dev-python/python-termstyle/Manifest4
-rw-r--r--dev-python/python-termstyle/files/tests-unicode.patch10
-rw-r--r--dev-python/python-termstyle/metadata.xml7
-rw-r--r--dev-python/python-termstyle/python-termstyle-0.1.10.ebuild36
4 files changed, 57 insertions, 0 deletions
diff --git a/dev-python/python-termstyle/Manifest b/dev-python/python-termstyle/Manifest
new file mode 100644
index 000000000000..4584834a3c3e
--- /dev/null
+++ b/dev-python/python-termstyle/Manifest
@@ -0,0 +1,4 @@
+AUX tests-unicode.patch 212 BLAKE2B 0c4d38d0fbdf3871cc81741f0f4533fd989b9636f5d9f435230a154b33d9fabdc5c3ec135f8168a4be1d9f990767871cea8ad19b3f8c6af7e5ab7ca9f9c07500 SHA512 cdb60f341dd186febe72e09586a7b1d65087c0773b1192d9725188cfa4b9bae902026ec7bb723359863695e08992b2b5bae2a25d7aed0c2018dd22dadb8b850b
+DIST python-termstyle-0.1.10.tar.gz 5025 BLAKE2B af652f560f3c6657ca01080cdaece77af7a1ecdf0758cf777035427197142b04a7d39a249da6eee90dc06cc2d15ca484c8b1d086c8e32e761acb8adc0eeccf3f SHA512 a0ed484da8da10c7fe1b8422a26861fb115dc29c49ce79c113053f913d3371edf6222de1ccf40e6aa34c3cfa9da5805eb3928fb07bfae18a13683621d7547743
+EBUILD python-termstyle-0.1.10.ebuild 836 BLAKE2B 2da27c78dd138620b88112092bdd81fb5776997154aef95e4153bbddd04af307252c16223c45fbd4040a4d620487eb69f3086b86be5605fbc23ddc6014908dc3 SHA512 9f9366f1470adce600cc42d3045340e1d2aa99edc4ee79f991c03b374b7fde56ee0ebebe8e57e998bf15bb0969b16d50e1608e482ce84fa1ab29e78416016eae
+MISC metadata.xml 221 BLAKE2B 2f422cb7330c3b501a8eab9e1f5471e6f5e71c36b72a6a4a7f44552eaa014de74aa896d4570f9875d201c095dc948788ddd1535f38819718d26c46db14cfed98 SHA512 7b2209a5979a8886321399bb1204e69f5d27773ff2a6c945f83188bb05790848bbca84992d0e7886a5d839fd37f469d5b892f552f25c874367c4daf65306820b
diff --git a/dev-python/python-termstyle/files/tests-unicode.patch b/dev-python/python-termstyle/files/tests-unicode.patch
new file mode 100644
index 000000000000..4cb410fa1984
--- /dev/null
+++ b/dev-python/python-termstyle/files/tests-unicode.patch
@@ -0,0 +1,10 @@
+diff --git a/test2.py b/test2.py
+index 2d84c37..1331545 100755
+--- a/test2.py
++++ b/test2.py
+@@ -2,4 +2,4 @@
+
+ from termstyle import *
+
+-print green(u"unicod\xe9!")
++print green(u"unicod\xe9!".encode('utf-8'))
diff --git a/dev-python/python-termstyle/metadata.xml b/dev-python/python-termstyle/metadata.xml
new file mode 100644
index 000000000000..9f0912b384f7
--- /dev/null
+++ b/dev-python/python-termstyle/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="github">gfxmonk/termstyle</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/python-termstyle/python-termstyle-0.1.10.ebuild b/dev-python/python-termstyle/python-termstyle-0.1.10.ebuild
new file mode 100644
index 000000000000..63bbddb076da
--- /dev/null
+++ b/dev-python/python-termstyle/python-termstyle-0.1.10.ebuild
@@ -0,0 +1,36 @@
+# 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} pypy )
+
+inherit distutils-r1 vcs-snapshot
+
+DESCRIPTION="console colouring for python"
+HOMEPAGE="http://gfxmonk.net/dist/0install/python-termstyle.xml"
+SRC_URI="https://github.com/gfxmonk/${PN#*-}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm64 ppc64 x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND=""
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}"/tests-unicode.patch
+ )
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ if [[ "${EPYTHON}" = "python2.7" ]]; then
+ "${PYTHON}" test2.py || die "test2.py failed under ${EPYTHON}"
+ else
+ "${PYTHON}" test3.py || die "test3.py failed under ${EPYTHON}"
+ fi
+}