mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 03:17:15 +08:00
python2-prettytable: imported as dependency of ceph
This commit is contained in:
parent
19ea44eae5
commit
6f615de1e3
@ -0,0 +1,29 @@
|
|||||||
|
From 9e291735c8e89879451c2feebda8f851dfa6e32c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Albers <daniel@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
|
||||||
|
@@ -73,7 +73,7 @@ MSWORD_FRIENDLY = 11
|
||||||
|
PLAIN_COLUMNS = 12
|
||||||
|
RANDOM = 20
|
||||||
|
|
||||||
|
-_re = re.compile("\033\[[0-9;]*m")
|
||||||
|
+_re = re.compile("\033(\[[0-9;]*m|\(B)")
|
||||||
|
|
||||||
|
def _get_size(text):
|
||||||
|
lines = text.split("\n")
|
||||||
|
--
|
||||||
|
2.2.0.rc0.207.ga3a616c
|
34
python2-prettytable/PKGBUILD
Normal file
34
python2-prettytable/PKGBUILD
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Contributions from ArchLinux: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/python-prettytable
|
||||||
|
|
||||||
|
pkgname=python2-prettytable
|
||||||
|
_pkgname=prettytable
|
||||||
|
pkgver=0.7.2
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A simple Python library for easily displaying tabular data"
|
||||||
|
url="http://pypi.python.org/pypi/PrettyTable"
|
||||||
|
arch=('any')
|
||||||
|
license=('BSD')
|
||||||
|
depends=(python2)
|
||||||
|
makedepends=('python2-setuptools')
|
||||||
|
source=("http://pypi.python.org/packages/source/P/PrettyTable/prettytable-${pkgver}.tar.gz"
|
||||||
|
'0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch')
|
||||||
|
md5sums=('a6b80afeef286ce66733d54a0296b13b'
|
||||||
|
'482146c8d245a6217d27195b65ca6592')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
pushd $_pkgname-$pkgver
|
||||||
|
patch -p1 -i "$srcdir"/0001-Fix-column-spacing-with-xterm-reset-escape-sequence.patch
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $srcdir/$_pkgname-$pkgver
|
||||||
|
python2 setup.py build
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir/$_pkgname-$pkgver"
|
||||||
|
chmod 644 -R prettytable.egg-info
|
||||||
|
|
||||||
|
python2 setup.py install --root="$pkgdir/"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user