mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
60 lines
2.1 KiB
Bash
60 lines
2.1 KiB
Bash
# Contributor: Felix Yan <felixonmars@archlinux.org>
|
|
# Contributor: Sebastien LEDUC <sebastien@sleduc.fr>
|
|
# Contributor: Andrey Mikhaylenko <neithere at gmail dot com>
|
|
|
|
pkgbase=python-pytest-cov
|
|
pkgname=('python3-pytest-cov' 'python2-pytest-cov')
|
|
pkgver=2.5.1
|
|
pkgrel=1
|
|
pkgdesc='py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing'
|
|
arch=('any')
|
|
license=('MIT')
|
|
url='https://github.com/schlamar/pytest-cov'
|
|
makedepends=('python3-coverage' 'python2-coverage' 'python3-setuptools' 'python2-setuptools'
|
|
'python3-pytest' 'python2-pytest')
|
|
checkdepends=('python3-virtualenv' 'python2-virtualenv' 'python3-process-tests'
|
|
'python2-process-tests' 'python3-pytest-cache' 'python2-pytest-cache'
|
|
'python3-pytest-xdist' 'python2-pytest-xdist'
|
|
'python3-fields' 'python2-fields')
|
|
source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-cov/archive/v$pkgver.tar.gz")
|
|
sha512sums=('4963eba62ae8e7c1a03eb3310c242b6c24c9e711345b3b4c85902a4a1ba74e1c22ebb38dd4c0ddd42d4d8fc12eb22dd3a4d99f392c424bfba0c50b4564bc444f')
|
|
|
|
prepare() {
|
|
cp -a pytest-cov-$pkgver{,-py2}
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/pytest-cov-$pkgver
|
|
python3 setup.py build
|
|
|
|
cd "$srcdir"/pytest-cov-$pkgver-py2
|
|
python2 setup.py build
|
|
}
|
|
|
|
check() {
|
|
# Hack entry points by installing it
|
|
|
|
cd "$srcdir"/pytest-cov-$pkgver
|
|
python3 setup.py install --root="$PWD/tmp_install" --optimize=1
|
|
PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH:$PWD/tests" py.test || warning "Tests failed"
|
|
|
|
cd "$srcdir"/pytest-cov-$pkgver-py2
|
|
python2 setup.py install --root="$PWD/tmp_install" --optimize=1
|
|
PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH:$PWD/tests" py.test2 || warning "Tests failed"
|
|
}
|
|
|
|
package_python3-pytest-cov() {
|
|
depends=('python3-pytest' 'python3-coverage')
|
|
|
|
cd pytest-cov-$pkgver
|
|
python3 setup.py install --root="$pkgdir" --optimize=1
|
|
}
|
|
|
|
package_python2-pytest-cov() {
|
|
depends=('python2-pytest' 'python2-coverage')
|
|
|
|
cd pytest-cov-$pkgver-py2
|
|
python2 setup.py install --root="$pkgdir" --optimize=1
|
|
}
|
|
# vim:set ts=2 sw=2 et:
|