37 lines
1.2 KiB
Bash
37 lines
1.2 KiB
Bash
# Template file for 'python3-coverage'
|
|
pkgname=python3-coverage
|
|
version=7.2.7
|
|
revision=1
|
|
build_style=python3-pep517
|
|
hostmakedepends="python3-setuptools python3-wheel"
|
|
makedepends="python3-devel"
|
|
checkdepends="$depends python3-pytest-xdist python3-flaky python3-hypothesis"
|
|
short_desc="Code coverage tool for Python"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="Apache-2.0"
|
|
homepage="https://github.com/nedbat/coveragepy"
|
|
changelog="https://raw.githubusercontent.com/nedbat/coveragepy/master/CHANGES.rst"
|
|
distfiles="${PYPI_SITE}/c/coverage/coverage-${version}.tar.gz"
|
|
checksum=924d94291ca674905fe9481f12294eb11f2d3d3fd1adb20314ba89e94f44ed59
|
|
|
|
pre_check() {
|
|
# required setup, see tox.ini
|
|
python igor.py zip_mods
|
|
}
|
|
|
|
do_check() {
|
|
# Running via PYTHONPATH breaks a few tests so we use a venv
|
|
local testdir="${wrksrc}/.xbps-testdir/$(date +%s)"
|
|
python3 -m venv --system-site-packages --without-pip "${testdir}"
|
|
|
|
local testpy="${testdir}/bin/python3"
|
|
"${testpy}" -m installer dist/*.whl
|
|
PATH="${testdir}/bin:${PATH}" "${testpy}" -m pytest -n ${XBPS_MAKEJOBS}
|
|
}
|
|
|
|
post_install() {
|
|
# remove versioned scripts (keep only /usr/bin/coverage)
|
|
rm ${DESTDIR}/usr/bin/coverage3
|
|
rm ${DESTDIR}/usr/bin/coverage-${py3_ver}
|
|
}
|