# Contributor: Brandon Bergren <git@bdragon.rtk0.net>
# Maintainer: Brandon Bergren <git@bdragon.rtk0.net>
pkgname=py3-webencodings
_pkgname=webencodings
_p="${_pkgname#?}"
_p="${_pkgname%"$_p"}"
pkgver=0.5.1
pkgrel=0
pkgdesc="Character encoding aliases for legacy web content"
url="https://pypi.python.org/pypi/webencodings"
arch="noarch"
# Packaging error, see https://github.com/gsnedders/python-webencodings/blob/master/LICENSE
license="BSD-3-Clause"
depends="python3"
checkdepends="py3-pytest"
makedepends="python3-dev"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/$_p/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="build/lib:$PYTHONPATH" pytest webencodings/tests.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="b727b01bac6ec79bca517960d27b4c0668b295f25559471b9641c2c33dab55db6dac9c990952177964c6418382c22831b14d57df5e632d51d7abf97b61f24326  py3-webencodings-0.5.1.tar.gz"