aboutsummaryrefslogblamecommitdiffstats
path: root/testing/py-netmiko/APKBUILD
blob: e02630031e1fd50259602c190f33faebbbd3b189 (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                                                           
            
        



                                                                                      
                                                   








































                                                                                                    
                                                                                                                                                                      
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-netmiko
_pkgname=${pkgname/py-/}
pkgver=2.3.3
pkgrel=1
pkgdesc="Multi-vendor library to simplify Paramiko SSH connections to network devices"
url="https://github.com/ktbyers/netmiko"
arch="noarch"
license="MIT"
depends="openssh-client py-yaml py-paramiko py-scp"
makedepends="py-setuptools python2-dev python3-dev"
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="$pkgname-$pkgver.tar.gz::https://github.com/ktbyers/${pkgname/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 - $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"
	depends="$depends $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="24f21a07b82f5ccc85e4ea0b48267d5bac099b7f3ce000576a256937769bbd8693b74a1b60c6cec33d6a5ebe0a363c7177094ae7769c5b682ff681abf4f24a39  py-netmiko-2.3.3.tar.gz"