56 lines
1.4 KiB
Bash
56 lines
1.4 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
|
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
|
|
|
|
pkgname=python-sphinx-autodoc-typehints
|
|
_pyname=${pkgname/python-/}
|
|
pkgver=2.5.0
|
|
pkgrel=2
|
|
pkgdesc='Type hints support for the Sphinx autodoc extension'
|
|
arch=(any)
|
|
url=https://github.com/tox-dev/sphinx-autodoc-typehints
|
|
license=(MIT)
|
|
depends=(
|
|
python
|
|
python-sphinx
|
|
)
|
|
makedepends=(
|
|
git
|
|
python-build
|
|
python-hatch-vcs
|
|
python-hatchling
|
|
python-installer
|
|
)
|
|
checkdepends=(
|
|
python-nptyping
|
|
python-pytest
|
|
python-sphobjinv
|
|
python-typing_extensions
|
|
)
|
|
optdepends=('python-nptyping: for numpydoc support')
|
|
source=("git+$url.git#tag=$pkgver")
|
|
b2sums=('df15df7f63585650886b0ab7a9d50bc949d3da93e880fa839119878524cbf27afe80362793d35664a295891662b091dcc5f3b6f6d421fd3d01f97b131db47734')
|
|
|
|
build() {
|
|
cd "$_pyname"
|
|
python -m build --wheel --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd "$_pyname"
|
|
PYTHONPATH="$PWD/src" pytest
|
|
}
|
|
|
|
package() {
|
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
install -d "$pkgdir/usr/share/licenses/$pkgname"
|
|
ln -s "$site_packages/${_pyname//-/_}-$pkgver.dist-info/licenses/LICENSE" \
|
|
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
|
|
cd "$_pyname"
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
|
|
}
|
|
|
|
# vim: ts=2 sw=2 et:
|