# Maintainer:
# Contributor: Liam Timms <timms5000@gmail.com>
# Contributor: Patrice Peterson <runiq at archlinux dot us>

pkgname=python-sphinxcontrib-apidoc
pkgver=0.6.0
pkgrel=1
pkgdesc='A Sphinx extension for running 'sphinx-apidoc' on each build'
arch=(any)
url='https://github.com/sphinx-contrib/apidoc'
license=(BSD-2-Clause)
depends=(
  python
  python-sphinx
  python-pbr
)
makedepends=(
  git
  python-build
  python-installer
  python-setuptools
  python-wheel
)
source=("$pkgname::git+$url#tag=$pkgver")
sha512sums=('a4d721d01a28288868207ec70f96be55e370652d480cef6d11a170e477e68c1cb32de343f36c930ad6a52677e9e536c523945dc167875ece37608ae42a31ad4f')
b2sums=('47b6ac829b02181f1003078917d5e175da5351b0b7d098eb8861c691b143fbd0fc75bb50282c64544a11498a471b25eb19693df1d18ea540cca22fe7da8c6acc')

build() {
  cd "$pkgname"

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

package() {
  cd "$pkgname"

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

  # license
  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
