# Contributor: Thomas Boerger # Maintainer: Thomas Boerger pkgname=py-prompt_toolkit _pkgname=prompt_toolkit pkgver=2.0.9 pkgrel=1 pkgdesc="Library for building powerful interactive command lines in Python" url="https://pypi.python.org/pypi/prompt_toolkit" arch="noarch" license="BSD" depends="py-six py-wcwidth" makedepends="python2-dev py-setuptools python3-dev" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$pkgname-$pkgver.tar.gz::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 check python3 setup.py check } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" 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="8fd0f8f2d05ba81dbdd02e2885652dc8d4e756d3cfc57646328c6ebc3e0e38242604cadc72c7f2479850800c8f0e9f555ffab33df3061800f9a99744d857afd3 py-prompt_toolkit-2.0.9.tar.gz"