Commit 6178ecfc authored by Leo's avatar Leo Committed by Natanael Copa

main/py3-paramiko: drop py2

parent c280268b
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-paramiko
pkgname=py3-paramiko
_pkgname=paramiko
pkgver=2.4.2
pkgrel=1
pkgdesc="An SSH2 protocol library for Python"
pkgrel=2
pkgdesc="An SSH2 protocol library for Python3"
url="https://github.com/paramiko/paramiko/"
arch="noarch"
license="LGPL-2.0-or-later"
options="!check"
depends="py-asn1 py-cryptography py-bcrypt py-pynacl"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="$pkgname-doc $pkgname-demos py3-$_pkgname:_py3 py2-$_pkgname:_py2"
depends="python3 py3-asn1 py3-cryptography py3-bcrypt py3-pynacl"
makedepends="py3-setuptools"
subpackages="$pkgname-doc $pkgname-demos"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-paramiko" # Backwards compatibility
provides="py-paramiko=$pkgver-r$pkgrel" # Backwards compatibility
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
package() {
mkdir -p "$pkgdir"
}
_py() {
local python="$1"
pkgdesc="$pkgdesc ${python#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
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
demos() {
depends="$pkgname=$pkgver-r$pkgrel"
pkgdesc="$pkgdesc (demos)"
mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/demos || return 1
mv "$builddir"/demos "$subpkgdir"/usr/share/doc/"$pkgname"/ || return 1
mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/demos
mv "$builddir"/demos "$subpkgdir"/usr/share/doc/"$pkgname"/
}
doc() {
depends=""
pkgdesc="$pkgdesc (documentation)"
mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/docs || return 1
mv "$builddir"/docs "$subpkgdir"/usr/share/doc/"$pkgname"/ || return 1
mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/docs
mv "$builddir"/docs "$subpkgdir"/usr/share/doc/"$pkgname"/
}
sha512sums="ebf277022ff0e26316cc1d3fc8d37918fb4b13f819e11a38dbafc7a77a1a4faf2d0b58ef60a582b9c66fb0650a453ae93ab405c04298fbaea83118bdf9a87906 paramiko-2.4.2.tar.gz"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment