# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: BrainDamage
_pkgname=python-readability
pkgbase=python-readability-lxml
pkgname=(
python-readability-lxml
python-readability-lxml-docs
)
pkgver=0.8.4.1
pkgrel=1
pkgdesc='Fast html to text parser (article readability tool) python library'
arch=(any)
url='https://github.com/buriy/python-readability'
license=(Apache-2.0)
depends=(
python
python-chardet
python-cssselect
python-lxml
python-lxml-html-clean
)
makedepends=(
git
python-build
python-installer
python-myst-parser
python-poetry-core
python-sphinx_rtd_theme
python-wheel
)
source=("git+https://github.com/buriy/python-readability.git#tag=$pkgver")
b2sums=(355f6a54e3909eec9b928b0e796c3adcb0b7b267bd59812d747a4b3e1d2dbd627139a1a1dcc317c7f3435585d6ade24a2f967a89b55bcef336d2639fed004be7)
build() {
cd $_pkgname
python -m build --wheel --no-isolation
}
package_python-readability-lxml() {
cd $_pkgname
python -m installer --destdir="$pkgdir" dist/*.whl
}
package_python-readability-lxml-docs() {
pkgdesc="Developer documentation for python-readability-lxml"
depends=()
cd $_pkgname
python -m sphinx -b html doc/source "$pkgdir/usr/share/doc/$pkgbase/html"
rm -r "$pkgdir/usr/share/doc/$pkgbase/html/.doctrees"
}