# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor: Mario Danic <mario.danic@gmail.com>
pkgname=python-paramiko
pkgver=3.4.0
pkgrel=2
pkgdesc="Python module that implements the SSH2 protocol"
url="https://github.com/paramiko/paramiko/"
license=('LGPL')
arch=('any')
depends=('python-bcrypt' 'python-cryptography' 'python-pynacl')
makedepends=('python-setuptools' 'python-bcrypt' 'python-cryptography' 'python-pynacl')
#checkdepends=('python-pytest-relaxed' 'python-pyasn1' 'python-invoke' 'python-lexicon' 'python-icecream')
optdepends=('python-invoke: config support'
'python-gssapi: GSS-API/SSPI support'
'python-pyasn1: GSS-API/SSPI support')
source=(
"https://github.com/paramiko/paramiko/archive/$pkgver/$pkgname-$pkgver.tar.gz"
"fix-pytest6-compatibility.patch"
)
sha512sums=('f78fccf653d05acee78dfb76fb662c85fbfea7901fd94460a2d2e526c9b25169993051d20c16cfe0b7745008b1ea3a745fc9a280386d98a06689aaadf78f6752'
'2a8eefbeb682e3b201309b792b164a62ecfffc6f2a45f157c8f7d31030cf889f9306838bfb1b7b02665122e0e4037bc0c5a22d76aa446617f1b3e61d359f99be')
prepare() {
cd paramiko-$pkgver
# Devendor test setup
sed -i "s/from invoke.vendor.lexicon import Lexicon/from lexicon import Lexicon/" tests/conftest.py
patch -Np1 -i ${srcdir}/fix-pytest6-compatibility.patch
}
#check() {
# cd paramiko-$pkgver
# LANG=en_US.UTF-8 pytest
#}
package() {
cd paramiko-$pkgver
python setup.py install --root="$pkgdir" --optimize=1
install -dm755 "$pkgdir"/usr/share/doc/$pkgname/demos
install -m644 demos/* "$pkgdir"/usr/share/doc/$pkgname/demos
chmod 755 "$pkgdir"/usr/share/doc/$pkgname/demos/*.py
}