[arch-commits] Commit in python-prettytable/repos (3 files)

Felix Yan felixonmars at archlinux.org
Wed Jul 7 10:36:12 UTC 2021


    Date: Wednesday, July 7, 2021 @ 10:36:11
  Author: felixonmars
Revision: 974395

archrelease: copy trunk to community-testing-any

Added:
  python-prettytable/repos/community-testing-any/
  python-prettytable/repos/community-testing-any/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch
    (from rev 974394, python-prettytable/trunk/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch)
  python-prettytable/repos/community-testing-any/PKGBUILD
    (from rev 974394, python-prettytable/trunk/PKGBUILD)

----------------------------------------------------------------+
 0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch |   30 ++++++
 PKGBUILD                                                       |   43 ++++++++++
 2 files changed, 73 insertions(+)

Copied: python-prettytable/repos/community-testing-any/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch (from rev 974394, python-prettytable/trunk/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch)
===================================================================
--- community-testing-any/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch	                        (rev 0)
+++ community-testing-any/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch	2021-07-07 10:36:11 UTC (rev 974395)
@@ -0,0 +1,30 @@
+From 9e291735c8e89879451c2feebda8f851dfa6e32c Mon Sep 17 00:00:00 2001
+From: Daniel Albers <daniel at lbe.rs>
+Date: Tue, 9 Dec 2014 17:47:50 +0100
+Subject: [PATCH] Fix column spacing with xterm reset escape sequence
+
+Change _re to also match \E(B\E[m as defined by terminfo for xterm:
+
+$ TERM=xterm tput sgr0 | od -xa
+0000000    281b    1b42    6d5b
+        esc   (   B esc   [   m
+---
+ prettytable.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/prettytable.py b/prettytable.py
+index a619659..3f6fb99 100644
+--- a/prettytable.py
++++ b/prettytable.py
+@@ -79,7 +79,7 @@ MARKDOWN = 13
+ ORGMODE = 14
+ RANDOM = 20
+ 
+-_re = re.compile(r"\033\[[0-9;]*m")
++_re = re.compile(r"\033(\[[0-9;]*m|\(B)")
+ 
+ 
+ def _get_size(text):
+-- 
+2.2.0.rc0.207.ga3a616c
+

Copied: python-prettytable/repos/community-testing-any/PKGBUILD (from rev 974394, python-prettytable/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2021-07-07 10:36:11 UTC (rev 974395)
@@ -0,0 +1,43 @@
+# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Sebastien Leduc <sebastien at sleduc.fr>
+# Contributor: Emmanuel Gil Peyrot <linkmauve at linkmauve.fr>
+
+_pkgname=prettytable
+pkgname=python-prettytable
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="A simple Python library for easily displaying tabular data"
+url="https://github.com/jazzband/prettytable"
+arch=('any')
+license=('BSD')
+depends=('python-wcwidth')
+makedepends=('python-setuptools-scm')
+checkdepends=('python-pytest')
+source=("https://files.pythonhosted.org/packages/source/p/prettyTable/prettytable-${pkgver}.tar.gz"
+        '0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch')
+sha512sums=('2b19d46e375fcc6f6f518d335e5d1e14eac854d0545000581496a13df03292a888ed05e7c9952afccc06706fc5258f7beb27c60291b336d586cebe432b784713'
+            '86cf8be475f62b0dfaa2483a37293cefd61e97bfe3c1226076cacc199da69bc5ea7e561bc311dd1b65f808f4fab202a0d38f702568ab7fbc091f285d2e52c924')
+
+export SETUPTOOLSA_SCM_PRETEND_VERSION=$pkgver
+
+prepare() {
+  pushd prettytable-$pkgver
+  patch -p1 -i "$srcdir"/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch
+  popd
+}
+
+build() {
+  cd prettytable-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd prettytable-$pkgver
+  pytest
+}
+
+package() {
+  cd prettytable-$pkgver
+  chmod 644 -R prettytable.egg-info
+  python setup.py install --root="$pkgdir/"
+}




More information about the arch-commits mailing list