desktop/python-pytest-forked/PKGBUILD
AlmAck 17bb03e88f python-pytest 3.2.3
added new checkdeps
2017-10-22 14:42:58 +02:00

56 lines
1.6 KiB
Bash

pkgbase=python-pytest-forked
pkgname=('python3-pytest-forked' 'python2-pytest-forked')
pkgver=0.2
pkgrel=1
pkgdesc='run tests in isolated forked subprocesses'
arch=('any')
license=('MIT')
url='https://github.com/pytest-dev/pytest-forked'
makedepends=('python3-pytest' 'python2-pytest' 'python3-setuptools-scm' 'python2-setuptools-scm')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-forked/archive/v$pkgver.tar.gz")
md5sums=('3c26f166ff2532c103a6572405db68b1')
prepare() {
cp -a pytest-forked-$pkgver{,-py2}
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
build() {
cd "$srcdir"/pytest-forked-$pkgver
python3 setup.py build
cd "$srcdir"/pytest-forked-$pkgver-py2
python2 setup.py build
}
check() {
# Hack entry points by installing it
cd "$srcdir"/pytest-forked-$pkgver
python3 setup.py install --root="$PWD/tmp_install" --optimize=1
PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH" py.test
cd "$srcdir"/pytest-forked-$pkgver-py2
python2 setup.py install --root="$PWD/tmp_install" --optimize=1
PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" py.test2
}
package_python3-pytest-forked() {
depends=('python3-pytest')
cd pytest-forked-$pkgver
python3 setup.py install --root="$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python2-pytest-forked() {
depends=('python2-pytest')
cd pytest-forked-$pkgver-py2
python2 setup.py install --root="$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
# vim:set ts=2 sw=2 et: