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

_pyname=gi_docgen
pkgname=gi-docgen
pkgver=2025.4
pkgrel=1
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"
msys2_references=(
  'purl: pkg:pypi/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
)
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('7fe066da082a4edcf924063767404f9d04a998f6c0f0c475b180fd9823a72dc5')

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

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

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

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