diff options
author | TBK <tbk@jjtc.eu> | 2019-02-12 01:40:45 +0100 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-03-12 21:25:30 +0000 |
commit | 541548887e361adc164433952f5747219aec1428 (patch) | |
tree | 4da7ec746d6ce0c3e6e96ee6ebc499cc560dbf9a /community/pytest-xdist/APKBUILD | |
parent | f2ed85c097fbf72e41bf402560a4278386504138 (diff) | |
download | aports-541548887e361adc164433952f5747219aec1428.tar.bz2 aports-541548887e361adc164433952f5747219aec1428.tar.xz |
community/pytest-xdist: moved from testing
Diffstat (limited to 'community/pytest-xdist/APKBUILD')
-rw-r--r-- | community/pytest-xdist/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/community/pytest-xdist/APKBUILD b/community/pytest-xdist/APKBUILD new file mode 100644 index 0000000000..d2d2b3fd1b --- /dev/null +++ b/community/pytest-xdist/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Dmitry Romanenko <dmitry@romanenko.in> +# Maintainer: Dmitry Romanenko <dmitry@romanenko.in> +pkgname=pytest-xdist +pkgver=1.26.1 +pkgrel=0 +pkgdesc="pytest xdist plugin for distributed testing and loop-on-failing modes" +url="https://github.com/pytest-dev/pytest-xdist" +arch="noarch" +license="MIT" +depends="py-execnet pytest pytest-forked py-six" +checkdepends="pytest py-filelock py-py" +makedepends="python2-dev python3-dev py-setuptools py-setuptools_scm" +subpackages="py3-$pkgname:_py3 py2-$pkgname:_py2" +source="https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz" + +build() { + python2 setup.py build + python3 setup.py build +} + +check() { + mkdir -p tmp_py2 + python2 setup.py install --root="$builddir/tmp_py2" --optimize=1 + PYTHONPATH="$builddir/tmp_py2/usr/lib/python2.7/site-packages:$PYTHONPATH" python2 -m pytest + + mkdir -p tmp_py3 + python3 setup.py install --root="$builddir/tmp_py3" --optimize=1 + PYTHONPATH="$builddir/tmp_py3/usr/lib/python3.6/site-packages:$PYTHONPATH" python3 -m pytest +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="c98be542447b6715410ef458961e1a9edcf692b60d119a61d596289f4e7c8899f23d6c7a34e2507dda792cfae8645730da6714b113e75ab64214bdba44666750 pytest-xdist-1.26.1.tar.gz" |