mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
dev-python/terminaltables: Port to py3.9, fix tests
Closes: https://bugs.gentoo.org/723590 Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user