# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>

_pyname=gi_docgen
pkgname=gi-docgen
pkgver=2024.1
pkgrel=2
pkgdesc="Documentation generator for GObject-based libraries"
url="https://gnome.pages.gitlab.gnome.org/gi-docgen/"
msys2_repository_url="https://gitlab.gnome.org/GNOME/gi-docgen"
arch=(any)
license=("spdx:Apache-2.0 OR GPL-3.0-or-later")
depends=(
  python
  python-jinja
  python-markdown
  python-markupsafe
  python-packaging
  python-pygments
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('2a4a5569f91109777481aa71451751289227f7c2652cfac366184a41eb19c231')

build() {
  cd "$_pyname-$pkgver"

  python -m build --wheel --no-isolation
}

package() {
  cd "$_pyname-$pkgver"

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