Date: Friday, April 7, 2023 @ 00:12:22 Author: grawlinson Revision: 1440340
upgpkg: python-wcwidth 0.2.6-1; new upstream release Modified: python-wcwidth/trunk/PKGBUILD ----------+ PKGBUILD | 58 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 13 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-04-07 00:11:37 UTC (rev 1440339) +++ PKGBUILD 2023-04-07 00:12:22 UTC (rev 1440340) @@ -1,21 +1,53 @@ -# Maintainer: Kyle Keen <[email protected]> +# Maintainer: George Rawlinson <[email protected]> +# Contributor: Kyle Keen <[email protected]> # Contributor: wenLiangcan <boxeed at gmail dot com> pkgname=python-wcwidth -_name=wcwidth -pkgver=0.2.5 -pkgrel=7 -pkgdesc="Measures number of Terminal column cells of wide-character codes" -url="https://github.com/jquast/wcwidth" +pkgver=0.2.6 +pkgrel=1 +pkgdesc='Python library that measures the width of unicode strings rendered to a terminal' +arch=('any') +url='https://github.com/jquast/wcwidth' license=('MIT') -arch=('any') depends=('python') -makedepends=('python-setuptools') -source=("https://files.pythonhosted.org/packages/source/w/$_name/$_name-$pkgver.tar.gz") -sha256sums=('c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83') +makedepends=( + 'git' + 'python-build' + 'python-installer' + 'python-setuptools' + 'python-wheel' +) +checkdepends=('python-pytest') +#optdepends=('') +_commit='f0232e5adfbcd7473021a5672c61ed79fee667f0' +source=("$pkgname::git+$url#commit=$_commit") +b2sums=('SKIP') +pkgver() { + cd "$pkgname" + + git describe --tags | sed 's/^v//' +} + +build() { + cd "$pkgname" + + python -m build --wheel --no-isolation +} + +check() { + cd "$pkgname" + + rm -v tox.ini + + pytest -v +} + package() { - cd "$srcdir/$_name-$pkgver" - python3 setup.py install --root="${pkgdir}" --optimize=1 - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + cd "$pkgname" + + python -m installer --destdir="$pkgdir" dist/*.whl + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE }
