pkgname=python-pkgconfig
pkgver=1.6.0
pkgrel=1
pkgdesc='Python module to interface with the pkg-config command line tool'
arch=(any)
url='https://github.com/matze/pkgconfig'
msys2_references=(
  "purl: pkg:pypi/pkgconfig"
)
license=('spdx:MIT')
depends=(
  "python"
  "pkgconf"
)
makedepends=(
  "python-poetry-core"
  "python-build"
  "python-installer"
)
source=(https://pypi.io/packages/source/p/pkgconfig/pkgconfig-$pkgver.tar.gz)
sha256sums=('4a5a6631ce937fafac457104a40d558785a658bbdca5c49b6295bc3fd651907f')

build() {
  cd pkgconfig-$pkgver

  export GIT_DIR="$(pwd)"
  python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd pkgconfig-$pkgver

  python -m installer --destdir="${pkgdir}" dist/*.whl

  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
