[arch-commits] Commit in python-prettytable/trunk (2 files)

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


    Date: Wednesday, July 7, 2021 @ 10:36:00
  Author: felixonmars
Revision: 974394

upgpkg: python-prettytable 1.0.0-1

Modified:
  python-prettytable/trunk/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch
  python-prettytable/trunk/PKGBUILD

----------------------------------------------------------------+
 0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch |   10 +--
 PKGBUILD                                                       |   30 ++++++----
 2 files changed, 24 insertions(+), 16 deletions(-)

Modified: 0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch
===================================================================
--- 0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch	2021-07-07 10:35:53 UTC (rev 974393)
+++ 0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch	2021-07-07 10:36:00 UTC (rev 974394)
@@ -16,15 +16,15 @@
 index a619659..3f6fb99 100644
 --- a/prettytable.py
 +++ b/prettytable.py
-@@ -73,7 +73,7 @@ MSWORD_FRIENDLY = 11
- PLAIN_COLUMNS = 12
+@@ -79,7 +79,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
 

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-07-07 10:35:53 UTC (rev 974393)
+++ PKGBUILD	2021-07-07 10:36:00 UTC (rev 974394)
@@ -4,32 +4,40 @@
 
 _pkgname=prettytable
 pkgname=python-prettytable
-pkgver=0.7.2
-pkgrel=14
+pkgver=1.0.0
+pkgrel=1
 pkgdesc="A simple Python library for easily displaying tabular data"
-url="https://pypi.python.org/pypi/PrettyTable"
+url="https://github.com/jazzband/prettytable"
 arch=('any')
 license=('BSD')
-depends=(python)
-makedepends=(python-setuptools)
-source=("https://files.pythonhosted.org/packages/source/P/PrettyTable/prettytable-${pkgver}.tar.gz"
+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')
-md5sums=('a6b80afeef286ce66733d54a0296b13b'
-         '62c2acf4a81ba9e6ac60ba06ff282068')
+sha512sums=('2b19d46e375fcc6f6f518d335e5d1e14eac854d0545000581496a13df03292a888ed05e7c9952afccc06706fc5258f7beb27c60291b336d586cebe432b784713'
+            '86cf8be475f62b0dfaa2483a37293cefd61e97bfe3c1226076cacc199da69bc5ea7e561bc311dd1b65f808f4fab202a0d38f702568ab7fbc091f285d2e52c924')
 
+export SETUPTOOLSA_SCM_PRETEND_VERSION=$pkgver
+
 prepare() {
-  pushd $_pkgname-$pkgver
+  pushd prettytable-$pkgver
   patch -p1 -i "$srcdir"/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch
   popd
 }
 
 build() {
-  cd "$_pkgname-$pkgver"
+  cd prettytable-$pkgver
   python setup.py build
 }
 
+check() {
+  cd prettytable-$pkgver
+  pytest
+}
+
 package() {
-  cd "$_pkgname-$pkgver"
+  cd prettytable-$pkgver
   chmod 644 -R prettytable.egg-info
   python setup.py install --root="$pkgdir/"
 }




More information about the arch-commits mailing list