# POWER Maintainer: Alexander Baldeck # Maintainer: Felix Yan # Contributor: Clément Démoulins # Contributor: Fazlul Shahriar _pkgname=coveragepy pkgname=python-coverage pkgver=7.5.1 pkgrel=1 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=('65692430ec44bf5e56f9005314baeb066f545270d6b007b34c682eb76f2f74e71499ed7dd7321ea965ade1afbe1b5c62a0a5447d9a52515819037afb22d89e18') b2sums=('f7cd083309db2361ee8c97cf5c90af54124794bcf6be5513edbc6303c0a2491722c92295e741c5397c58d947256611a45fabc3adc6ed48b4fe1ff44d0dacd9b6') 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 }