# Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=py-toml _pkgname=pytoml pkgver=0.1.20 pkgrel=0 pkgdesc="A TOML-0.4.0 parser/writer for Python" url="https://github.com/avakar/pytoml" arch="all" license="MIT" depends="" makedepends="python2-dev python3-dev py-setuptools" install="" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$pkgname-$pkgver.tar.gz::https://github.com/avakar/$_pkgname/archive/v$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" --optimize=1 } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } sha512sums="9b913219e65e2329302455a1457a39cf5eb37e04c03025dfdbb81db4ffe60b547fb7e64fc961608004900365ccfddb4225042105fa2db8bd2e393fa2797fc24f py-toml-0.1.20.tar.gz"