newapkbuild: use pytest for Python tests

This commit is contained in:
Bart Ribbers 2021-01-10 17:56:12 +01:00 committed by Natanael Copa
parent 281720ec39
commit 65c9a3d8e5
1 changed files with 7 additions and 2 deletions

View File

@ -131,7 +131,7 @@ __EOF__
check_python() {
cat >>APKBUILD<<__EOF__
python3 setup.py test
pytest
__EOF__
}
@ -238,10 +238,14 @@ newaport() {
source="https://downloads.sourceforge.net/$pn/$pn-$pv.tar.gz"
fi
if [ -z "$depends" ] &&[ "$buildtype" = "python" ]; then
if [ -z "$depends" ] && [ "$buildtype" = "python" ]; then
depends="python3"
fi
if [ -z "$checkdepends" ] && [ "$buildtype" = "python" ]; then
checkdepends="py3-pytest"
fi
case "$buildtype" in
python) makedepends="py3-setuptools";;
cmake) makedepends="cmake";;
@ -282,6 +286,7 @@ license="$license"
depends="$depends"
depends_dev=""
makedepends="$makedepends"
checkdepends="$checkdepends"
install="$install"
subpackages="\$pkgname-dev \$pkgname-doc"
source="$source"