aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-ncclient
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-12-20 12:57:43 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-12-21 11:26:39 +0000
commitbaeae5887cc833191bc0acbe09bbc416820d190c (patch)
tree30b95e0653c95ffd51cbf79377e63bfb613feb01 /testing/py-ncclient
parent2958003c5f7fd26af8492cbcfd934f9704da7ec0 (diff)
downloadaports-baeae5887cc833191bc0acbe09bbc416820d190c.tar.bz2
aports-baeae5887cc833191bc0acbe09bbc416820d190c.tar.xz
testing/py-ncclient: new aport
Diffstat (limited to 'testing/py-ncclient')
-rw-r--r--testing/py-ncclient/APKBUILD49
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/py-ncclient/APKBUILD b/testing/py-ncclient/APKBUILD
new file mode 100644
index 0000000000..a399a917d7
--- /dev/null
+++ b/testing/py-ncclient/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=py-ncclient
+pkgver=0.5.3
+pkgrel=0
+pkgdesc="Library for NETCONF clients"
+url="https://github.com/tomchristie/itypes"
+arch="noarch"
+license="Apache2"
+depends="py-paramiko py-lxml py-six"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+options="!check" #no testsuite
+source="$pkgname-$pkgver.tar.gz::https://github.com/ncclient/ncclient/archive/v$pkgver.tar.gz"
+builddir="$srcdir"/ncclient-$pkgver
+
+build() {
+ cd "$builddir"
+ python2 setup.py --quiet build
+ python3 setup.py --quiet build
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"/usr/bin
+}
+
+_py2() {
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ local pyver="${1:6:1}"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py --quiet install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="53320a745dda98cd6e7c2e4cf87df446b90b74982543e529810225060c5774a4c3f2470a3d6e4fd84ad83cac11a4ea50b538a9a95c5d9cfd5c5714c693342217 py-ncclient-0.5.3.tar.gz"