# Contributor: Dmitry Romanenko # Maintainer: Dmitry Romanenko 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"