# Contributor: # Maintainer: Natanael Copa _pkgname=chardet pkgname=py3-$_pkgname pkgver=5.1.0 pkgrel=1 pkgdesc="The Universal Character Encoding Detector" url="https://github.com/chardet/chardet/" arch="noarch" license="LGPL-2.1-or-later" depends="python3" makedepends="py3-gpep517 py3-setuptools py3-wheel" checkdepends="py3-pytest" subpackages="$pkgname-pyc" source="$pkgname-$pkgver.tar.gz::https://github.com/chardet/chardet/archive/refs/tags/$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" replaces="py-chardet" # Backwards compatibility provides="py-chardet=$pkgver-r$pkgrel" # Backwards compatibility 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=" 531888329979d229f3e966a428d14feb4612df5b71e3dff3ee3358ecbc964af95370e4c03aacecea0941d11840a16b2b12814ea8af977ff81a5abbec41d983cd py3-chardet-5.1.0.tar.gz "