summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 527dce2bdaf576a7b100190ab6ffb946e06b6b84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Maintainer: Benjamin Abadie <benjamin.abadie enix fr>

pkgname=python-pyeapi
_pkgname=pyeapi
pkgver=0.8.3
pkgrel=4
pkgdesc="Python client for Arista eAPI "
arch=('any')
url="https://pyeapi.readthedocs.io/"
license=('BSD')
depends=('python-netaddr')
makedepends=('git' 'python-setuptools' )
checkdepends=('python-pytest' 'python-mock' 'python-coverage')
source=("git+https://github.com/arista-eosplus/pyeapi.git#tag=v$pkgver")
md5sums=('SKIP')

check() {
    cd "$srcdir/$_pkgname/"
    coverage run -m unittest discover test/unit -v
}

build() {
	cd "$srcdir/$_pkgname/"
    python setup.py build
}

package() {
	cd "$srcdir/$_pkgname/"
	python setup.py install --root="$pkgdir" --optimize=1 --skip-build
    mkdir -p "$pkgdir/usr/share/licenses/$_pkgname/"
    cp LICENSE "$pkgdir/usr/share/licenses/$_pkgname/"
}