mirror of
https://github.com/void-linux/void-packages.git
synced 2025-10-02 08:35:16 +02:00
39 lines
1.4 KiB
Bash
39 lines
1.4 KiB
Bash
# Template file for 'python3-coverage'
|
|
pkgname=python3-coverage
|
|
version=7.9.1
|
|
revision=1
|
|
build_style=python3-pep517
|
|
# this counts files but our installed package has fewer files
|
|
make_check_args="--deselect tests/test_testing.py::test_all_our_source_files"
|
|
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=6cf43c78c4282708a28e466316935ec7489a9c487518a77fa68f716c67909cec
|
|
|
|
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} \
|
|
${make_check_args} ${make_check_target}
|
|
}
|
|
|
|
post_install() {
|
|
# remove versioned scripts (keep only /usr/bin/coverage)
|
|
rm ${DESTDIR}/usr/bin/coverage3
|
|
rm ${DESTDIR}/usr/bin/coverage-${py3_ver}
|
|
}
|