summaryrefslogtreecommitdiff
path: root/user/py3-pyang/APKBUILD
diff options
context:
space:
mode:
authorCyberLeo <cyberleo@cyberleo.net>2021-07-22 21:02:46 -0500
committerCyberLeo <cyberleo@cyberleo.net>2021-07-22 21:02:46 -0500
commit59068642667b2748b2f24d18c58b1d2fdfed7619 (patch)
treedeca4d721637676253ed1270f252f8d389286151 /user/py3-pyang/APKBUILD
parent4a177049e3d486da3f54d346d63ea80699c08b5b (diff)
parent50e523c03bbcb6be1298e3dedb0441b7e47ab2eb (diff)
downloadpackages-59068642667b2748b2f24d18c58b1d2fdfed7619.tar.gz
packages-59068642667b2748b2f24d18c58b1d2fdfed7619.tar.bz2
packages-59068642667b2748b2f24d18c58b1d2fdfed7619.tar.xz
packages-59068642667b2748b2f24d18c58b1d2fdfed7619.zip
Merge branch 'master' into kpartx
Diffstat (limited to 'user/py3-pyang/APKBUILD')
-rw-r--r--user/py3-pyang/APKBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/user/py3-pyang/APKBUILD b/user/py3-pyang/APKBUILD
new file mode 100644
index 000000000..6ac07ef7f
--- /dev/null
+++ b/user/py3-pyang/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=py3-pyang
+_pkgname=pyang
+_p="${_pkgname#?}"
+_p="${_pkgname%"$_p"}"
+pkgver=2.3.2
+pkgrel=0
+pkgdesc="YANG tooling for Python"
+url="https://pypi.org/project/pyang/"
+arch="noarch"
+license="ISC"
+depends="python3 py3-lxml"
+makedepends=""
+subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp"
+source="https://files.pythonhosted.org/packages/source/$_p/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/pyang-$pkgver"
+
+build() {
+ python3 setup.py build
+}
+
+check() {
+ python3 setup.py test
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+bashcomp() {
+ pkgdesc="$pkgdesc (Bash completions)"
+ depends="py3-pyang"
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ mkdir "$subpkgdir"
+ mv "$pkgdir"/usr/etc "$subpkgdir"/
+}
+
+sha512sums="11f4e0531bea85eab63bf20c4ee785e24c81988333abb90a9ab076704fde8617eaa12f8b3f6f162ddbb4f83ffc2d20b9941311a529b296c198cb2ecd665ad63f pyang-2.3.2.tar.gz"