# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: xantares
_name=alabaster
pkgname=python-sphinx-alabaster-theme
pkgver=0.7.16
pkgrel=2
pkgdesc='Light, configurable Sphinx theme'
arch=('any')
url=https://github.com/sphinx-doc/alabaster
license=('BSD-3-Clause')
depends=('python')
makedepends=(
'git'
'python-build'
'python-flit-core'
'python-installer'
'python-wheel'
)
source=("git+$url.git#tag=$pkgver")
b2sums=('e67e311364df98595eac9320d894e628ca78a73ce49864984c788b1926294d9a805932b2e22e6b6d0330865f1eb308f042a8084c21374df540885bd25e3258b5')
build() {
cd $_name
python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd $_name
python -m installer --destdir="$pkgdir" dist/*.whl
# Symlink license file
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d "$pkgdir"/usr/share/licenses/$pkgname
ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}