From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/terminaltables/files/, dev-python/terminaltables/
Date: Thu, 30 Jul 2020 06:03:06 +0000 (UTC) [thread overview]
Message-ID: <1596088975.c188ba0d3efb81b4708dc5baf19b9bfbcb6248cf.mgorny@gentoo> (raw)
commit: c188ba0d3efb81b4708dc5baf19b9bfbcb6248cf
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 30 05:47:59 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 30 06:02:55 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c188ba0d
dev-python/terminaltables: Port to py3.9, fix tests
Closes: https://bugs.gentoo.org/723590
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../files/terminaltables-3.1.0-stdout.patch | 23 ++++++++++++++++++++++
.../terminaltables/terminaltables-3.1.0.ebuild | 19 +++++++++---------
.../terminaltables/terminaltables-9999.ebuild | 10 +++-------
3 files changed, 36 insertions(+), 16 deletions(-)
diff --git a/dev-python/terminaltables/files/terminaltables-3.1.0-stdout.patch b/dev-python/terminaltables/files/terminaltables-3.1.0-stdout.patch
new file mode 100644
index 00000000000..e463ff66f93
--- /dev/null
+++ b/dev-python/terminaltables/files/terminaltables-3.1.0-stdout.patch
@@ -0,0 +1,23 @@
+From 9cb9d0ef11fac861e46776fb18cef309df28c234 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 30 Jul 2020 07:59:05 +0200
+Subject: [PATCH] Fix writing binary data to sys.stdout
+
+---
+ terminaltables/terminal_io.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/terminaltables/terminal_io.py b/terminaltables/terminal_io.py
+index 8b8c10d..310263c 100644
+--- a/terminaltables/terminal_io.py
++++ b/terminaltables/terminal_io.py
+@@ -94,5 +94,5 @@ def set_terminal_title(title, kernel32=None):
+ return kernel32.SetConsoleTitleW(title) != 0
+
+ # Linux/OSX.
+- sys.stdout.write(b'\033]0;' + title_bytes + b'\007')
++ sys.stdout.buffer.write(b'\033]0;' + title_bytes + b'\007')
+ return True
+--
+2.28.0
+
diff --git a/dev-python/terminaltables/terminaltables-3.1.0.ebuild b/dev-python/terminaltables/terminaltables-3.1.0.ebuild
index 384bf33858e..86d74c67298 100644
--- a/dev-python/terminaltables/terminaltables-3.1.0.ebuild
+++ b/dev-python/terminaltables/terminaltables-3.1.0.ebuild
@@ -3,27 +3,28 @@
EAPI=7
-PYTHON_COMPAT=( python{3_6,3_7} )
+PYTHON_COMPAT=( python3_{6..9} )
inherit distutils-r1
DESCRIPTION="Generate simple tables in terminals from a nested list of strings"
HOMEPAGE="https://robpol86.github.io/terminaltables"
-SRC_URI="https://github.com/Robpol86/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="
+ https://github.com/Robpol86/terminaltables/archive/v${PV}.tar.gz
+ -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+BDEPEND="
test? (
dev-python/colorama[${PYTHON_USEDEP}]
dev-python/colorclass[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
dev-python/termcolor[${PYTHON_USEDEP}]
)"
-python_test() {
- pytest -vv || die "Tests fail with ${EPYTHON}"
-}
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/terminaltables-3.1.0-stdout.patch
+)
diff --git a/dev-python/terminaltables/terminaltables-9999.ebuild b/dev-python/terminaltables/terminaltables-9999.ebuild
index a855b1d99da..7bacaa3fb7c 100644
--- a/dev-python/terminaltables/terminaltables-9999.ebuild
+++ b/dev-python/terminaltables/terminaltables-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python{3_6,3_7} )
+PYTHON_COMPAT=( python3_{6..9} )
EGIT_REPO_URI="https://github.com/Robpol86/${PN}.git"
inherit distutils-r1 git-r3
@@ -14,10 +14,8 @@ SRC_URI=""
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
-IUSE="test"
-RESTRICT="!test? ( test )"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+BDEPEND="
test? (
dev-python/colorama[${PYTHON_USEDEP}]
dev-python/colorclass[${PYTHON_USEDEP}]
@@ -25,6 +23,4 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/termcolor[${PYTHON_USEDEP}]
)"
-python_test() {
- pytest -vv || die "Tests fail with ${EPYTHON}"
-}
+distutils_enable_tests pytest
reply other threads:[~2020-07-30 6:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1596088975.c188ba0d3efb81b4708dc5baf19b9bfbcb6248cf.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox