37 lines
1.2 KiB
Bash
37 lines
1.2 KiB
Bash
# Template file for 'python3-coverage'
|
|
pkgname=python3-coverage
|
|
version=7.6.1
|
|
revision=1
|
|
build_style=python3-pep517
|
|
hostmakedepends="python3-setuptools"
|
|
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=953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d
|
|
|
|
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}
|
|
}
|