aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pytest-xdist/APKBUILD
blob: 9a2dd80fb302be314e482d3e989064aefdfe0f5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Contributor: Dmitry Romanenko <dmitry@romanenko.in>
# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
pkgname=py3-pytest-xdist
pkgver=1.31.0
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="py3-execnet py3-pytest py3-pytest-forked py3-six"
checkdepends="py3-filelock py3-py"
makedepends="py3-setuptools py3-setuptools_scm"
source="https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest-xdist-$pkgver.tar.gz
	skip-failing-test.patch"
builddir="$srcdir/pytest-xdist-$pkgver"

replaces="pytest-xdist" # Backwards compatibility
provides="pytest-xdist=$pkgver-r$pkgrel" # Backwards compatibility

case "$CARCH" in
# tests work when run manually, crash on builder
mips*)	options="!check" ;;
esac

build() {
	python3 setup.py build
}

check() {
	mkdir -p tmp_py3
	python3 setup.py install --root="$builddir/tmp_py3" --optimize=1
	local _py3ver=$(python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
	PYTHONPATH="$builddir/tmp_py3/usr/lib/python$_py3ver/site-packages:$PYTHONPATH" python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="b7960d20295232b251c8ddcc5a3b9d6e7b761d577ba11c2647b4b4b410ee5c05998cf57fa57208561eb3ea7c4914db1fd446173794589d8c8e8e79ff8e0ad3aa  pytest-xdist-1.31.0.tar.gz
4777113de61a6377a8c45f6a3321fabef3b407a2efdfe70baacd6ba0df0266742efdeb1008532fe2f42c831ea2b908b820fb3a17808567e265d67b1970f876ad  skip-failing-test.patch"