Update to latest version. Remove patch that does not work with this version, add commented out test code until it could actually work.

This commit is contained in:
MARINA\jpmug
2022-02-07 09:13:07 -05:00
parent 5ea52da50f
commit 8c226a0d4e
2 changed files with 18 additions and 39 deletions

View File

@@ -1,25 +0,0 @@
From 9083a42bab0dac997e1c00180671e80828a3b359 Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen521kk@gmail.com>
Date: Thu, 28 Jan 2021 16:55:23 +0530
Subject: [PATCH] Fix column spacing with xterm reset escape sequence
---
src/prettytable/prettytable.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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(r"\033\[[0-9;]*m")
+_re = re.compile(r"\033(\[[0-9;]*m|\(B)")
def _get_size(text):
--
2.29.2.windows.2

View File

@@ -7,40 +7,44 @@ 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=2.2.0
pkgver=3.0.0
pkgrel=1
pkgdesc="A simple Python library for easily displaying tabular data (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="https://pypi.python.org/pypi/PrettyTable"
url="https://github.com/jazzband/prettytable"
license=('BSD')
depends=("${MINGW_PACKAGE_PREFIX}-python-wcwidth")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools-scm")
#checkdepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools-pytest-cov")
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=('bd81678c108e6c73d4f1e47cd4283de301faaa6ff6220bcd1d4022038c56b416'
'e9dd93c51ca3769c41cd2b7b27c58d8e6683fd4b6f4665291ad542d7917765d0')
source=("${_realname}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/P/PrettyTable/${_realname}-${pkgver}.tar.gz")
sha512sums=('f7b03ee1c1371187708b1cd7724f1afead1249a796928d2abdce42fa834ee128e930f20aef1df579426c65f1fb574b1a831e521ade6e9e65977d5dd88bafc5af')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -Np1 -i "${srcdir}/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch"
cd "${srcdir}"
rm -rf python-build-${CARCH} | true
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
rm -rf python-build-${MSYSTEM} | true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
build() {
msg "Python build for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
msg "Python build for ${MSYSTEM}"
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python setup.py build
}
# These tests fail because it can't load a module.
#check() {
# msg "Python test for ${MSYSTEM}"
# cd "${srcdir}/python-build-${MSYSTEM}"
# ${MINGW_PREFIX}/bin/pytest
#}
package() {
cd "${srcdir}/python-build-${CARCH}"
msg "Python install for ${MSYSTEM}"
cd "${srcdir}/python-build-${MSYSTEM}"
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