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

55 lines
1.5 KiB
Bash

pkgbase=python-pytest-timeout
pkgname=('python3-pytest-timeout' 'python2-pytest-timeout')
pkgver=1.2.0
pkgrel=1
pkgdesc='py.test plugin to abort hanging tests'
arch=('any')
license=('MIT')
url='https://bitbucket.org/pytest-dev/pytest-timeout'
makedepends=('python3-pytest' 'python2-pytest' 'mercurial')
checkdepends=('python3-pexpect' 'python2-pexpect')
source=("hg+https://bitbucket.org/pytest-dev/pytest-timeout#tag=$pkgver")
md5sums=('SKIP')
prepare() {
cp -a pytest-timeout{,-py2}
}
build() {
cd "$srcdir"/pytest-timeout
python3 setup.py build
cd "$srcdir"/pytest-timeout-py2
python2 setup.py build
}
check() {
# Hack entry points by installing it
cd "$srcdir"/pytest-timeout
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-timeout-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-timeout() {
depends=('python3-pytest')
cd pytest-timeout
python3 setup.py install --root="$pkgdir"/ --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python2-pytest-timeout() {
depends=('python2-pytest')
cd pytest-timeout-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: