# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com> # Maintainer: Felix Yan <felixonmars@archlinux.org> # Contributor: Clément Démoulins <clement@archivel.fr> # Contributor: Fazlul Shahriar <fshahriar@gmail.com> _pkgname=coveragepy pkgname=python-coverage pkgver=7.6.8 pkgrel=2 pkgdesc="A tool for measuring code coverage of Python programs" arch=(x86_64 powerpc64le powerpc64 powerpc riscv64) url="https://coverage.readthedocs.io/en/latest/" license=('Apache-2.0') depends=('glibc' 'python') makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel') checkdepends=('python-flaky' 'python-hypothesis' 'python-pytest' 'python-pytest-xdist' 'python-unittest-mixins' 'python-virtualenv') source=("$pkgname-$pkgver.tar.gz::https://github.com/nedbat/coveragepy/archive/$pkgver.tar.gz") sha512sums=('ddd5a01fb368b0a460768823f7d82664a32f7dfdc04e0f8197fc3e345e83f5211420a6c09f248904247fac61c9905501331084183e37d6594a60916d61134287') b2sums=('d16d0fbe671416ef5c7c0e51ed0ab1ae3a031622b3807aebdd06b552b41ce393a268c1a73fb042b9cac3aad41a49e448aea350e78888fe36cfda45216060d833') build() { cd $_pkgname-$pkgver python -m build --wheel --no-isolation } check() { cd $_pkgname-$pkgver local python_version="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')" ( virtualenv "test_dir" --system-site-packages . "test_dir/bin/activate" export PYTHONPATH="/usr/lib/python$python_version/site-packages:$PYTHONPATH" export COVERAGE_NO_CONTRACTS=1 python setup.py --quiet clean develop python igor.py zip_mods install_egg remove_extension python igor.py test_with_tracer py python setup.py --quiet build_ext --inplace python igor.py test_with_tracer c ) || echo "Known failing tests." } package() { cd $_pkgname-$pkgver python -m installer --destdir="$pkgdir" dist/*.whl }