# Contributor: Fabian Affolter # Maintainer: Fabian Affolter pkgname=py-markupsafe _pkgname=MarkupSafe pkgver=1.0 pkgrel=1 pkgdesc="Implements a XML/HTML/XHTML Markup safe string" url="https://github.com/mitsuhiko/markupsafe" arch="all" license="BSD" depends="" makedepends="python2-dev python3-dev py-setuptools" subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_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" } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" find "$subpkgdir" -name "*.c" -delete } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } sha512sums="7437a02cb1b9c1d6d6c20b13d394f24a1cd1cb8c743f832d8b1cbb6ab8846f70f54d924dd693423b33c4d592e772983ae38fd4a35961e233457c48bd3584ecb8 MarkupSafe-1.0.tar.gz"