diff options
author | Britney Fransen <brfransen@gmail.com> | 2018-03-23 19:19:20 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2018-03-23 19:19:20 (GMT) |
commit | 2a93a9f6b60020f1b449cd4907d4bd3ae2f94825 (patch) | |
tree | 4cd6e6282cbfbcf9b28c25cda7df057ff3d8e02a /abs/core/python_modules/python-pytest-forked | |
parent | 1deebcd28a11e7d379e979c01a207a9e7519d6ac (diff) | |
download | linhes_pkgbuild-2a93a9f6b60020f1b449cd4907d4bd3ae2f94825.zip linhes_pkgbuild-2a93a9f6b60020f1b449cd4907d4bd3ae2f94825.tar.gz linhes_pkgbuild-2a93a9f6b60020f1b449cd4907d4bd3ae2f94825.tar.bz2 |
python-pytest-forked: dep of python-pytest-xdist
Diffstat (limited to 'abs/core/python_modules/python-pytest-forked')
-rw-r--r-- | abs/core/python_modules/python-pytest-forked/PKGBUILD | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/abs/core/python_modules/python-pytest-forked/PKGBUILD b/abs/core/python_modules/python-pytest-forked/PKGBUILD new file mode 100644 index 0000000..02d7776 --- /dev/null +++ b/abs/core/python_modules/python-pytest-forked/PKGBUILD @@ -0,0 +1,58 @@ +# $Id$ +# Maintainer: Felix Yan <felixonmars@archlinux.org> + +pkgbase=python-pytest-forked +pkgname=('python-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=('python-pytest' 'python2-pytest' 'python-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 + python 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 + python 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_python-pytest-forked() { + depends=('python-pytest') + + cd pytest-forked-$pkgver + python 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: |