# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Ashwin Vishnu <ashwinvis+arch at pr0t0nm4il dot com>

pkgname=python-beniget
pkgver=0.5.0
pkgrel=2
pkgdesc='A static analyzer for Python code'
arch=(any)
url='https://github.com/serge-sans-paille/beniget'
license=(BSD-3-Clause)
depends=(python
         python-gast)
makedepends=(git
             python-build
             python-installer
             python-setuptools
             python-wheel)
source=(git+https://github.com/serge-sans-paille/beniget#tag=$pkgver)
sha256sums=('b83e50dba3214e7cc1bf24cf104be9ebf5f1bbd3b56f4c2d0b519c511307b834')

build() {
  cd beniget
  python -m build --wheel --no-isolation
}

package() {
  cd beniget
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
