1SUMMARY="Relaxed test discovery/organization for pytest"
2DESCRIPTION="pytest-relaxed provides relaxed test discovery for pytest.
3
4It is the spiritual successor to https://pypi.python.org/pypi/spec, but is built for pytest \
5instead of nosetests, and rethinks some aspects of the design (such as increased ability to \
6opt-in to various behaviors)."
7HOMEPAGE="https://github.com/bitprophet/pytest-relaxed"
8COPYRIGHT="2020 Jeff Forcier"
9LICENSE="BSD (2-clause)"
10REVISION="3"
11SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz"
12CHECKSUM_SHA256="80ec97a6e220237b0fdb11ad0101005740bfe9855f0bc3851ac1e6ba1d5f7d95"
13SOURCE_DIR="pytest-relaxed-$portVersion"
14
15ARCHITECTURES="any"
16
17PROVIDES="
18	$portName = $portVersion
19	"
20REQUIRES="
21	haiku
22	"
23
24BUILD_REQUIRES="
25	haiku_devel
26	"
27
28PYTHON_PACKAGES=(python39 python310)
29PYTHON_VERSIONS=(3.9 3.10)
30for i in "${!PYTHON_PACKAGES[@]}"; do
31pythonPackage=${PYTHON_PACKAGES[i]}
32pythonVersion=${PYTHON_VERSIONS[$i]}
33eval "PROVIDES_${pythonPackage}=\"\
34	${portName}_$pythonPackage = $portVersion\
35	\"; \
36REQUIRES_$pythonPackage=\"\
37	haiku\n\
38	decorator_$pythonPackage\n\
39	pytest_$pythonPackage\n\
40	six_$pythonPackage\n\
41	cmd:python$pythonVersion\
42	\""
43BUILD_REQUIRES="$BUILD_REQUIRES
44	setuptools_$pythonPackage"
45BUILD_PREREQUIRES="$BUILD_PREREQUIRES
46	cmd:python$pythonVersion"
47done
48
49INSTALL()
50{
51	for i in "${!PYTHON_PACKAGES[@]}"; do
52		pythonPackage=${PYTHON_PACKAGES[i]}
53		pythonVersion=${PYTHON_VERSIONS[$i]}
54
55		python=python$pythonVersion
56		installLocation=$prefix/lib/$python/vendor-packages/
57		export PYTHONPATH=$installLocation:$PYTHONPATH
58		mkdir -p $installLocation
59		rm -rf build
60		$python setup.py build install \
61			--root=/ --prefix=$prefix
62
63		packageEntries  $pythonPackage \
64			$prefix/lib/python*
65	done
66}
67