# Contributor: Stefan Wagner # Maintainer: Stefan Wagner pkgname=py-webencodings _pkgname=webencodings pkgver=0.5.1 pkgrel=1 pkgdesc="Character encoding for the web" url="https://github.com/gsnedders/python-webencodings" arch="noarch" license="MIT" makedepends="python2-dev python3-dev py-setuptools" subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3" source="$_pkgname-$pkgver.tar.gz::https://github.com/gsnedders/python-$_pkgname/archive/v$pkgver.tar.gz" builddir="$srcdir"/python-$_pkgname-$pkgver build() { cd "$builddir" python2 setup.py build python3 setup.py build } check() { cd "$builddir" python2 setup.py test python3 setup.py test } package() { mkdir -p "$pkgdir" } _py2() { depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="c5cb34f35fb5bc7ffb88c19eb3262dedbf6231c0ee2871dccbc0f9497193d8209fc20703d451a2bb41a5ff913e63abf7481f7a8f9886c953724e9cf71c34cb74 webencodings-0.5.1.tar.gz"