aports/community/py3-listparser/APKBUILD
mio 054c16c9cf community/py3-listparser: upgrade to 0.20, build with gpep517, fix running tests
https://github.com/kurtmckee/listparser/releases/tag/v0.20

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-03 12:16:48 +00:00

37 lines
1.1 KiB
Text

# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-listparser
pkgver=0.20
pkgrel=0
pkgdesc="Parse OPML, FOAF, and iGoogle subscription lists"
url="https://github.com/kurtmckee/listparser"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-lxml py3-requests"
makedepends="py3-gpep517 py3-poetry-core py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
# Using GitHub source as PyPI tarball does not include tests directory
source="https://github.com/kurtmckee/listparser/archive/v$pkgver/listparser-v$pkgver.tar.gz"
builddir="$srcdir/listparser-$pkgver"
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 pytest
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
f288f584eb592733130def27356b67f37f852f452b131f180fab59d1434f937cbd753610dcca5d2054a596494e8bbf5a9445bc857113f3d2cb6faac39b5285f1 listparser-v0.20.tar.gz
"