# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=python-pkgconfig
pkgver=1.5.5
pkgrel=8
pkgdesc='Python module to interface with the pkg-config command line tool'
arch=(any)
url='https://github.com/matze/pkgconfig'
license=(MIT)
depends=(python)
makedepends=(git
             python-build
             python-installer
             python-poetry-core)
checkdepends=(python-pytest
              python-setuptools)
source=(git+https://github.com/matze/pkgconfig#tag=v$pkgver)
sha256sums=('bd84e39169a35fe299c4de616c2a6da0287ee88a5a08080645c7175a4685e639')

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

check() {
  cd pkgconfig
  pytest -v
}

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