# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-future _pkgname=python-future pkgver=0.18.1 pkgrel=1 pkgdesc="Easy, clean, reliable Python 2/3 compatibility" url="http://python-future.org/" arch="noarch" license="MIT" makedepends="python2-dev python3-dev py-setuptools" subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/f/future/future-$pkgver.tar.gz" builddir="$srcdir/${_pkgname/python-/}-$pkgver" prepare() { default_prepare cd "$builddir" mkdir -p $pkgname-py2 cp -a "$builddir" "$builddir"-py2 } build() { cd "$builddir"-py2 python2 setup.py build cd "$builddir" python3 setup.py build } check() { cd "$builddir"-py2 python2 setup.py check cd "$builddir" python3 setup.py check } package() { mkdir -p "$pkgdir" } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" if [ $python = "python2" ]; then cd "$builddir"-py2 else cd "$builddir" fi $python setup.py install --prefix=/usr --root="$subpkgdir" install -Dm0644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE.txt } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } sha512sums="c70565a660cf87c5e7e994bae0d4eb0b2b8b607ecb5ce65521c027bf0a39ce5699f0578413bd3c7edd5d01aeb1617de48dcea098a9e9021d8487a73007573030 py-future-0.18.1.tar.gz"