aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pytest-xdist/APKBUILD
blob: c23a7a28f16b61124cb7fc4356305a513f3d029c (plain) (blame)
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.32.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="f159b4653efb4afeff4124df484670d3c672e1014712f948390b25efc53096f8237258c83a5f1a9e688c52b4a756291cb731d37fdfa800707f556550a19cb0e8  pytest-xdist-1.32.0.tar.gz
da339ce326ccd6bc46024af269bf36b19e2cd384e71edc73fc85b031b763125f2f1b3ef3c3d8f44e56f0198e1838291ca8b503bd8ce081a69e5b0f11ab06bf3f  skip-failing-test.patch"