2023-11-02 21:20:03 +00:00

42 lines
1.2 KiB
Plaintext

# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=py3-wcwidth
_pkgname=wcwidth
pkgver=0.2.9
pkgrel=0
pkgdesc="Measures number of Terminal column cells of wide-character codes"
url="https://pypi.org/project/wcwidth"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-cov"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-wcwidth" # Backwards compatibility
provides="py-wcwidth=$pkgver-r$pkgrel" # Backwards compatibility
# circular dependency on pytest
options="$options !check"
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
8aff2ce67d8f331c4c75907f14ec602f4829d39e3f89af640d598e075165a011e41a5451a333bc2f6c95f33a4b9ca8ae1a5d02efe4f79acc988d60b85bf5929b wcwidth-0.2.9.tar.gz
"