Merge pull request #7823 from naveen521kk/prettytable

python-prettytable: update to 2.0.0
This commit is contained in:
Christoph Reiter
2021-01-28 13:12:32 +01:00
committed by GitHub
2 changed files with 22 additions and 25 deletions

View File

@@ -1,30 +1,25 @@
From 9e291735c8e89879451c2feebda8f851dfa6e32c Mon Sep 17 00:00:00 2001
From: Daniel Albers <daniel@lbe.rs>
Date: Tue, 9 Dec 2014 17:47:50 +0100
From 9083a42bab0dac997e1c00180671e80828a3b359 Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen@syrusdark.website>
Date: Thu, 28 Jan 2021 16:55:23 +0530
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 +-
src/prettytable/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
@@ -73,7 +73,7 @@ MSWORD_FRIENDLY = 11
PLAIN_COLUMNS = 12
diff --git a/src/prettytable/prettytable.py b/src/prettytable/prettytable.py
index b84e4e9..d07f698 100644
--- a/src/prettytable/prettytable.py
+++ b/src/prettytable/prettytable.py
@@ -58,7 +58,7 @@ MARKDOWN = 13
ORGMODE = 14
RANDOM = 20
-_re = re.compile("\033\[[0-9;]*m")
+_re = re.compile("\033(\[[0-9;]*m|\(B)")
-_re = re.compile(r"\033\[[0-9;]*m")
+_re = re.compile(r"\033(\[[0-9;]*m|\(B)")
def _get_size(text):
lines = text.split("\n")
--
2.2.0.rc0.207.ga3a616c
2.29.2.windows.2

View File

@@ -1,25 +1,27 @@
# Maintainer: Andrew Sun <adsun701@gmail.com>
_pyname=PrettyTable
_realname=prettytable
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=0.7.2
pkgver=2.0.0
pkgrel=1
pkgdesc="A simple Python library for easily displaying tabular data (mingw-w64)"
arch=('any')
url="https://pypi.python.org/pypi/PrettyTable"
license=('BSD')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
depends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-wcwidth")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools-scm")
options=('staticlibs' 'strip' '!debug')
_dtoken=dc2e9370bf3be766302dbd6cd9729e258e875d31a7a21c9f760aaa5b5b5e
source=("${_realname}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/P/PrettyTable/${_realname}-${pkgver}.tar.gz"
"0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch")
sha256sums=('2d5460dc9db74a32bcc8f9f67de68b2c4f4d2f01fa3bd518764c69156d9cacd9'
'24e5f10a874910bdc5eab6807443a7f9712ac568fa5e940a313ac5b2a05150f8')
sha256sums=('e37acd91976fe6119172771520e58d1742c8479703489321dc1d9c85e7259922'
'81d3d904b6a692121bc5f96bc3e3b47e000660c146a093d46529cbde43395c9e')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
@@ -28,6 +30,7 @@ prepare() {
cd "${srcdir}"
rm -rf python-build-${CARCH} | true
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
build() {
@@ -38,7 +41,6 @@ build() {
package() {
cd "${srcdir}/python-build-${CARCH}"
chmod 644 -R prettytable.egg-info
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build