diff --git a/mingw-w64-python-prettytable/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch b/mingw-w64-python-prettytable/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch index aca1225518..820cf80dec 100644 --- a/mingw-w64-python-prettytable/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch +++ b/mingw-w64-python-prettytable/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch @@ -1,30 +1,25 @@ -From 9e291735c8e89879451c2feebda8f851dfa6e32c Mon Sep 17 00:00:00 2001 -From: Daniel Albers -Date: Tue, 9 Dec 2014 17:47:50 +0100 +From 9083a42bab0dac997e1c00180671e80828a3b359 Mon Sep 17 00:00:00 2001 +From: Naveen M K +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 diff --git a/mingw-w64-python-prettytable/PKGBUILD b/mingw-w64-python-prettytable/PKGBUILD index e88b84d525..f8385a38d1 100644 --- a/mingw-w64-python-prettytable/PKGBUILD +++ b/mingw-w64-python-prettytable/PKGBUILD @@ -1,25 +1,27 @@ # Maintainer: Andrew Sun +_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