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-ddt/APKBUILD
mio 01de9d8ef9 community/py3-ddt: upgrade to 1.7.2, build with gpep517, fix running tests
https://github.com/datadriventests/ddt/releases/tag/1.7.2
https://github.com/datadriventests/ddt/releases/tag/1.7.1
https://github.com/datadriventests/ddt/releases/tag/1.7.0

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 18:20:21 +00:00

42 lines
1,014 B
Text

# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-ddt
pkgver=1.7.2
pkgrel=0
pkgdesc="Python library to multiply test cases"
url="https://github.com/datadriventests/ddt"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="
py3-aiounittest
py3-mock
py3-pytest
py3-six
py3-yaml
"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/d/ddt/ddt-$pkgver.tar.gz"
builddir="$srcdir/ddt-$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="
90db674075f1174014fb7a88810267023f57e446535bade44a60e3027df6317fe555ca127bf682b5619188f087a533b985b3c6fc9aa96f065598faaaf19a3d7c ddt-1.7.2.tar.gz
"