# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-scp _pkgname=${pkgname/py-/}.py pkgver=0.13.2 pkgrel=0 pkgdesc="scp module for paramiko" url="https://github.com/jbardin/scp.py" arch="noarch" license="GPL" depends="py-paramiko py-six py-cffi py-idna py-asn1crypto py-cparser" makedepends="python2-dev py-setuptools python3-dev" subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="$pkgname-$pkgver.tar.gz::https://github.com/jbardin/scp.py/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" check() { cd "$builddir" python2 setup.py check python3 setup.py check } build() { cd "$builddir" python2 setup.py build python3 setup.py build } package() { mkdir -p "$pkgdir" } _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" } _py2() { replaces="$pkgname" depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } sha512sums="56a83958204c7b38d68c8ca896fbe8de1e2198acc0d0c76524e77218bccbf90c67f460f4bd4c745cde7112147fa1860f63777eaef52134519e226e69cd883cb9 py-scp-0.13.2.tar.gz"