diff options
author | peeweep | 2019-10-02 04:02:08 +0800 |
---|---|---|
committer | peeweep | 2019-10-02 04:02:08 +0800 |
commit | c454806200b206fa61fe8f20b610ee14281fd4e0 (patch) | |
tree | 28d8239de3db4a8059a10f8b6c1e755f3e9dfa5e | |
parent | e78b4cb19ce2eb09dc65ae2e93241e1c55a406f5 (diff) | |
download | aur-c454806200b206fa61fe8f20b610ee14281fd4e0.tar.gz |
Update arch/denpends/patch/prepare
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | python.patch | 1 | ||||
-rw-r--r-- | python2.patch | 75 |
4 files changed, 98 insertions, 26 deletions
@@ -1,20 +1,22 @@ pkgbase = python-termcolors pkgdesc = A Python script to show off your beautiful terminal palette pkgver = 0.1.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/scizzorz/termcolors - arch = x86_64 + arch = any license = MIT makedepends = python-setuptools makedepends = python2-setuptools source = python-termcolors-0.1.0.tar.gz::https://github.com/scizzorz/termcolors/archive/v0.1.0.tar.gz source = python2.patch source = python.patch - md5sums = fc2249cf55752db81bf86ea5e7a2cdad - md5sums = 7d159998a6b049eb51e4051f0dca9bf2 - md5sums = 313949661feb29e7ef016fb36da89fab + sha256sums = 2ca59c092bc063ac298110e1b96a4af25bd14692be4f5959c162b86a386cfd3b + sha256sums = d1dd71acbd26a8646d9ba4f4c5baba168fcf6ae0fb645cbcfcbf39ec3de44fc2 + sha256sums = 89bdb486d1af665de573ef3e2dc64c2622f9645f0928112fe036459cb9a30e07 pkgname = python-termcolors + depends = python pkgname = python2-termcolors + depends = python2 @@ -3,41 +3,41 @@ pkgname=('python-termcolors' 'python2-termcolors') pkgdesc="A Python script to show off your beautiful terminal palette" pkgver=0.1.0 -pkgrel=1 +pkgrel=2 license=('MIT') url='https://github.com/scizzorz/termcolors' -arch=('x86_64') -# depends=('python' 'python2') +arch=('any') makedepends=('python-setuptools' 'python2-setuptools') -source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz" - python2.patch - python.patch) -md5sums=('fc2249cf55752db81bf86ea5e7a2cdad' - '7d159998a6b049eb51e4051f0dca9bf2' - '313949661feb29e7ef016fb36da89fab') +source=( + "${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz" + "python2.patch" + "python.patch" +) +sha256sums=('2ca59c092bc063ac298110e1b96a4af25bd14692be4f5959c162b86a386cfd3b' + 'd1dd71acbd26a8646d9ba4f4c5baba168fcf6ae0fb645cbcfcbf39ec3de44fc2' + '89bdb486d1af665de573ef3e2dc64c2622f9645f0928112fe036459cb9a30e07') prepare() { cd "${srcdir}/termcolors-${pkgver}" mv README.md README.rst -} - -package_python2-termcolors() { + cp -r "${srcdir}/termcolors-${pkgver}" "${srcdir}/termcolors-${pkgver}-2" + patch -p1 <"${srcdir}/python.patch" - cd "${srcdir}/termcolors-${pkgver}" + cd "${srcdir}/termcolors-${pkgver}-2" patch -p1 <"${srcdir}/python2.patch" +} +package_python2-termcolors() { + depends=('python2') + cd "${srcdir}/termcolors-${pkgver}-2" python2 setup.py install --root="$pkgdir" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } package_python-termcolors() { - + depends=('python') cd "${srcdir}/termcolors-${pkgver}" - patch -p1 <"${srcdir}/python.patch" - python setup.py install --root="$pkgdir" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/python.patch b/python.patch index b9ace48fa216..0dda197957fb 100644 --- a/python.patch +++ b/python.patch @@ -1,5 +1,4 @@ diff --git a/termcolors.py b/termcolors.py -index 0f5421a..cda61ba 100755 --- a/termcolors.py +++ b/termcolors.py @@ -27,7 +27,7 @@ def _highlight(text = ' *** ', fg = None, bg = None): diff --git a/python2.patch b/python2.patch index 0656e910d54f..c76b6382d3da 100644 --- a/python2.patch +++ b/python2.patch @@ -1,8 +1,79 @@ diff --git a/bin/termcolors b/bin/termcolors -index 1d6de0d..e8f91a6 100755 --- a/bin/termcolors +++ b/bin/termcolors @@ -1,2 +1,2 @@ - #!/bin/sh +-#!/bin/sh -python -m termcolors $@ ++#!/usr/bin/bash +python2 -m termcolors $@ +diff --git a/termcolors.py b/termcolors.py +--- a/termcolors.py ++++ b/termcolors.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python2 + import sys + + # highlights a string with the given color +@@ -27,7 +27,7 @@ def _highlight(text = ' *** ', fg = None, bg = None): + return '\033[%dm\033[%dm%s\033[0m' % (fg_esc, bg_esc, text) + + def _print_short(): +- print '' ++ print('') + + for f in range(2): + row = ' ' +@@ -35,26 +35,26 @@ def _print_short(): + row += _highlight(text=' ', fg = b, bg = b) + row += _highlight(text=' ', fg = b + 8, bg = b + 8) + row += ' ' +- print row ++ print(row) + +- print '' ++ print('') + + def _print_palette(): +- print '' ++ print('') + + row = ' '*5 + for b in range(8): + row += _highlight(text=' %2s ' % b, fg = b) + row += _highlight(text=' %2s ' % (b + 8), fg = b + 8) + row += ' ' +- print row ++ print(row) + + row = ' '*5 + for b in range(8): + row += _highlight(text=' ', fg = b, bg = b) + row += _highlight(text=' ', fg = b + 8, bg = b + 8) + row += ' ' +- print row ++ print(row) + + for f in range(16): + row = _highlight(text=' %2s ' % f, fg = f) +@@ -63,9 +63,9 @@ def _print_palette(): + row += _highlight(text=' %2s ' % f, fg = f, bg = b) + row += _highlight(text=' %2s ' % f, fg = f, bg = b + 8) + row += ' ' +- print row ++ print(row) + +- print '' ++ print('') + + def main(args): + if len(args) == 0: +@@ -73,7 +73,7 @@ def main(args): + elif args[0] in ('-s', '--short'): + _print_short() + else: +- print 'Usage: termcolors [-s|--short]' ++ print('Usage: termcolors [-s|--short]') + + if __name__ == '__main__': + main(sys.argv[1:]) |