# Maintainer: Carl Smedstad <carsme@archlinux.org>

pkgname=python-sphinxcontrib-doxylink
_pkgname=doxylink
pkgver=1.13.0
pkgrel=1
pkgdesc="A Sphinx extension to link to external Doxygen API documentation"
arch=('any')
url="https://github.com/sphinx-contrib/doxylink"
license=('BSD-2-Clause')
depends=(
  'python'
  'python-dateutil'
  'python-docutils'
  'python-pyparsing'
  'python-requests'
  'python-sphinx'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-poetry-core'
  'python-wheel'
)
checkdepends=(
  'doxygen'
  'python-pytest'
  'python-testfixtures'
)
source=("$url/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('047f8f4b9dbd104c004cfe24211af38b7a21fd707a103b214b6a5c5af3c4790c')

build() {
  cd "$_pkgname-$pkgver"
  python -m build --wheel --no-isolation
}

check() {
  cd "$_pkgname-$pkgver"
  pytest
}

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