# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Felix Yan <felixonmars@archlinux.org>

_pyname=astroid
pkgname=python-$_pyname
pkgver=2.8.0
pkgrel=1
pkgdesc='A common base representation of python source code'
arch=(any)
url="https://github.com/PyCQA/$_pyname"
license=(LGPL)
_pydeps=(lazy-object-proxy
         typing-extensions
         wrapt)
depends=(python
         "${_pydeps[@]/#/python-}")
makedepends=(python-setuptools)
checkdepends=(python-pytest)
replaces=(python-logilab-astng)
conflicts=(python-logilab-astng)
_archive="$_pyname-$pkgver"
source=("$url/archive/v$pkgver/$_archive.tar.gz")
sha256sums=('20d69b874d2fd6ffd3f71c51ce67ba253f288342b803bda247da2595f0d0ed8f')

build() {
	cd "$_archive"
	python setup.py build
}

check() {
	cd "$_archive"
	pytest
}

package() {
	cd "$_archive"
	python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
