[arch-commits] Commit in python-terminaltables/repos/community-any (3 files)

Levente Polyak anthraxx at archlinux.org
Sat Jan 18 16:00:02 UTC 2020


    Date: Saturday, January 18, 2020 @ 16:00:01
  Author: anthraxx
Revision: 553035

archrelease: copy trunk to community-any

Added:
  python-terminaltables/repos/community-any/PKGBUILD
    (from rev 553034, python-terminaltables/trunk/PKGBUILD)
  python-terminaltables/repos/community-any/python-3.8.patch
    (from rev 553034, python-terminaltables/trunk/python-3.8.patch)
Deleted:
  python-terminaltables/repos/community-any/PKGBUILD

------------------+
 PKGBUILD         |   81 ++++++++++++++++++++++++++++-------------------------
 python-3.8.patch |   26 +++++++++++++++++
 2 files changed, 69 insertions(+), 38 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-01-18 15:59:55 UTC (rev 553034)
+++ PKGBUILD	2020-01-18 16:00:01 UTC (rev 553035)
@@ -1,38 +0,0 @@
-# Maintainer: Christian Rebischke <chris.rebischke[at]archlinux[dot]org>
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-
-pkgname=python-terminaltables
-_pyname=terminaltables
-pkgver=3.1.0
-pkgrel=6
-pkgdesc="Generate simple tables in terminals from a nested list of strings"
-arch=('any')
-url="https://github.com/Robpol86/terminaltables"
-license=('MIT')
-depends=('python')
-makedepends=('python-setuptools')
-checkdepends=('python-pytest' 'python-colorama' 'python-termcolor' 'python-colorclass')
-source=("${_pyname}-${pkgver}.tar.gz::https://github.com/Robpol86/${_pyname}/archive/v${pkgver}.tar.gz")
-sha512sums=('dc49458652fff8bc6094d316d84c9b8e9fca1a26e3230c0b668bc03ec8528793f4ef024e8032d4a56fbfabfdfd4a1142870f550f0b373ba6a42dd2e3ead3f501')
-
-build() {
-  msg2 "Building python..."
-  cd ${_pyname}-${pkgver}
-  python setup.py build
-}
-
-check() {
-  msg2 "Checking python..."
-  cd ${_pyname}-${pkgver}
-  py.test
-}
-
-package() {
-  cd ${_pyname}-${pkgver}
-  python setup.py install -O1 --root="${pkgdir}" --skip-build
-  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
-  install -Dm 644 example*.py -t "${pkgdir}/usr/share/doc/${pkgname}/examples"
-}
-
-# vim:set et sw=2 ts=2 tw=79:

Copied: python-terminaltables/repos/community-any/PKGBUILD (from rev 553034, python-terminaltables/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-01-18 16:00:01 UTC (rev 553035)
@@ -0,0 +1,43 @@
+# Maintainer: Christian Rebischke <chris.rebischke[at]archlinux[dot]org>
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+pkgname=python-terminaltables
+_pyname=terminaltables
+pkgver=3.1.0
+pkgrel=7
+pkgdesc="Generate simple tables in terminals from a nested list of strings"
+arch=('any')
+url="https://github.com/Robpol86/terminaltables"
+license=('MIT')
+depends=('python')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-colorama' 'python-termcolor' 'python-colorclass')
+source=("${_pyname}-${pkgver}.tar.gz::https://github.com/Robpol86/${_pyname}/archive/v${pkgver}.tar.gz"
+        python-3.8.patch)
+sha512sums=('dc49458652fff8bc6094d316d84c9b8e9fca1a26e3230c0b668bc03ec8528793f4ef024e8032d4a56fbfabfdfd4a1142870f550f0b373ba6a42dd2e3ead3f501'
+            '9a33ef51cbd2854bf9acc247e2d966332229446158e7dae9cad25e03335eb9689d50b0a22234285aa56c707e6e93c12f950299efcfbe7e42ed527216090592f2')
+
+prepare() {
+  cd ${_pyname}-${pkgver}
+  patch -Np1 < ../python-3.8.patch
+}
+
+build() {
+  cd ${_pyname}-${pkgver}
+  python setup.py build
+}
+
+check() {
+  cd ${_pyname}-${pkgver}
+  py.test
+}
+
+package() {
+  cd ${_pyname}-${pkgver}
+  python setup.py install -O1 --root="${pkgdir}" --skip-build
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 example*.py -t "${pkgdir}/usr/share/doc/${pkgname}/examples"
+}
+
+# vim:set et sw=2 ts=2 tw=79:

Copied: python-terminaltables/repos/community-any/python-3.8.patch (from rev 553034, python-terminaltables/trunk/python-3.8.patch)
===================================================================
--- python-3.8.patch	                        (rev 0)
+++ python-3.8.patch	2020-01-18 16:00:01 UTC (rev 553035)
@@ -0,0 +1,26 @@
+From dcd9ba5c1c35d986fabe1b3a529cf15d08875a33 Mon Sep 17 00:00:00 2001
+From: Carl Suster <carl at contraflo.ws>
+Date: Tue, 12 Nov 2019 14:19:23 +1100
+Subject: [PATCH] Write bytes to underluing buffer of stdout
+
+This was adapted from an example in the python docs and solves test failures seen on the CI. We need to write to the underlying buffer object of the stream, but in case `sys.stdout` was replaced with a file-like object without a buffer there's a fallback to direct writing.
+---
+ terminaltables/terminal_io.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/terminaltables/terminal_io.py b/terminaltables/terminal_io.py
+index 8b8c10d..005da1b 100644
+--- a/terminaltables/terminal_io.py
++++ b/terminaltables/terminal_io.py
+@@ -94,5 +94,10 @@ def set_terminal_title(title, kernel32=None):
+             return kernel32.SetConsoleTitleW(title) != 0
+ 
+     # Linux/OSX.
+-    sys.stdout.write(b'\033]0;' + title_bytes + b'\007')
++    set_title = b'\033]0;' + title_bytes + b'\007'
++    if hasattr(sys.stdout, 'buffer'):
++        sys.stdout.buffer.write(set_title)
++    else:
++        text = set_title.decode(sys.stdout.encoding, 'strict')
++        sys.stdout.write(text)
+     return True



More information about the arch-commits mailing list