# Contributor: Fabian Affolter # Contributor: Jakub Jirutka # Maintainer: Fabian Affolter pkgname=py-yaml _pkgname=PyYAML pkgver=3.12 pkgrel=0 pkgdesc="Python bindings for YAML" url="http://pyyaml.org" arch="noarch" license="MIT" depends="" makedepends="python2-dev python3-dev yaml-dev" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="http://pyyaml.org/download/pyyaml/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build || return 1 python3 setup.py build } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" arch="all" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="4c129761b661d181ebf7ff4eb2d79950 PyYAML-3.12.tar.gz" sha256sums="592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab PyYAML-3.12.tar.gz" sha512sums="e16d8b7f4f026b6a95b11fb59c54ec5f114f6f516294eaa95e718abdf5d37c17a9c4b5e0a0a61fca04e801792d9b7fb801087cf849ff22b9581f6af204b1883a PyYAML-3.12.tar.gz"