1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-16 04:35:13 +03:00
aports/community/py3-readability-lxml/APKBUILD
mio 1549d83ed0 community/py3-readability-lxml: build with gpep517, fix running tests
Switch to gpep517 and fix check failure due to removed `setup.py test` command,
which was deprecated in setuptools 72.0.0.

```
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'test'
```

Ref: https://gitlab.alpinelinux.org/alpine/aports/-/issues/17110
2025-05-02 03:25:33 +00:00

41 lines
1.2 KiB
Text

# Maintainer:
pkgname=py3-readability-lxml
pkgver=0.8.1
pkgrel=7
pkgdesc="fast python port of arc90's readability tool, updated to match latest readability.js!"
url="https://github.com/buriy/python-readability"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-chardet py3-lxml py3-lxml-html-clean py3-cssselect"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-timeout-decorator"
# pypi version doesn't have tests
subpackages="$pkgname-pyc"
source="readability-lxml-$pkgver.tar.gz::https://github.com/buriy/python-readability/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/python-readability-$pkgver"
prepare() {
default_prepare
rm readability/compat/two.py
}
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m unittest
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
c5b296a35606f65643f72e7d9ee07d6820a7a6a36ce97350673ea6076b704f7ed72f92ded47dac56690cdf3776eb8fadbb02ea234355a9982d4127976b2e6c6e readability-lxml-0.8.1.tar.gz
"