diff options
author | Felix Yan | 2020-09-02 21:27:28 +0000 |
---|---|---|
committer | David Runge | 2024-02-26 18:51:15 +0100 |
commit | 613abb4c5899e5bd0dd4e4187d6770d8db1bae02 (patch) | |
tree | 8a4e8d58ebe183a9251f786526e76e6946e311c7 | |
parent | 0fcbc7fcbe02ee1341d155a09910c28549769034 (diff) | |
download | aur-613abb4c5899e5bd0dd4e4187d6770d8db1bae02.tar.gz |
addpkg: 0.8.4-1
-rw-r--r-- | PKGBUILD | 43 |
1 files changed, 28 insertions, 15 deletions
@@ -1,26 +1,39 @@ -# Maintainer: Ben Oliver <ben@bfoliver.com> +# Maintainer: Felix Yan <felixonmars@archlinux.org> -pkgbase='python-ansiwrap' -pkgname=('python-ansiwrap') -_module='ansiwrap' -pkgver='0.8.4' +pkgname=python-ansiwrap +pkgver=0.8.4 +_commit=20e2e8c78a54bdce947e38c069c5eb9c115423ae pkgrel=1 pkgdesc="textwrap, but savvy to ANSI colors and styles" url="https://github.com/jonathaneunice/ansiwrap" -depends=('python' 'python-textwrap3') -makedepends=('python-setuptools') -license=('Python') +license=('Apache') arch=('any') -source=("https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.zip") -md5sums=('0e24741bda593b7bd2162c3e3bd3b8ba') +depends=('python') +makedepends=('python-setuptools') +checkdepends=('python-pytest' 'python-ansicolors') +source=("https://github.com/jonathaneunice/ansiwrap/archive/$_commit/$pkgname-$_commit.tar.gz" + $pkgname-no-textwrap3.patch::https://github.com/jonathaneunice/ansiwrap/pull/16.patch) +sha512sums=('a01f1f1f79c7a84ca63013f6d05e2abeb00135905d1763f1b5d9fe430613c6bb10fbd2e345074e0001a8e7e40f1916d4c3a946da4dbb02fa288277ad441fab00' + '54064900875534263a11ddfd013928383dbb2f00f6e3e6b098940bb1159c485439191667b6c742214c10ec84aca8e3cc62cdc3a5d9ea39cb3e2b74f13ad3a4a4') + +prepare() { + cd ansiwrap-$_commit + patch -p1 -i ../$pkgname-no-textwrap3.patch + sed -i 's/import textwrap3 as textwrap/import textwrap/' test/test_ansiwrap.py + sed -i 's/textwrap3/textwrap/' ansiwrap/core.py +} build() { - cd "${srcdir}/${_module}-${pkgver}" - python setup.py build + cd ansiwrap-$_commit + python setup.py build +} + +check() { + cd ansiwrap-$_commit + python -m pytest } package() { - depends+=() - cd "${srcdir}/${_module}-${pkgver}" - python setup.py install --root="${pkgdir}" --optimize=1 --skip-build + cd ansiwrap-$_commit + python setup.py install --root="$pkgdir" --optimize=1 } |