summaryrefslogblamecommitdiff
path: root/user/py3-pyang/APKBUILD
blob: 8be0b9f7764c55eef4e36f8b767af8c1f89cbf92 (plain) (tree)
1
2
3
4
5
6
7





                                                  
            































                                                                                              
                                                                                                                                                                 
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=py3-pyang
_pkgname=pyang
_p="${_pkgname#?}"
_p="${_pkgname%"$_p"}"
pkgver=2.5.3
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="651f6f405018c3798a8ead870427eb6241b3466c6c29310e1d5c867599d8e9ed4898020316e397ad4d7c12abcf59b1a7a826dd2710546251b49973f6e8f32a9d  pyang-2.5.3.tar.gz"