37 lines
1.2 KiB
Bash
37 lines
1.2 KiB
Bash
# Template file for 'python3-coverage'
|
|
pkgname=python3-coverage
|
|
version=7.4.4
|
|
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="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
|
|
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=c901df83d097649e257e803be22592aedfd5182f07b3cc87d640bbb9afd50f49
|
|
|
|
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}
|
|
}
|