0
0
Fork 0
haikuports/dev-python/pytest/pytest-6.2.4.recipe

74 lines
1.8 KiB
Bash

SUMMARY="A Python testing framework"
DESCRIPTION="The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries."
HOMEPAGE="https://pytest.org"
COPYRIGHT="2010-2020 Holger Krekel and others."
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://pypi.io/packages/source/p/pytest/pytest-$portVersion.tar.gz"
CHECKSUM_SHA256="50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"
ARCHITECTURES="any"
PROVIDES="
pytest=$portVersion
cmd:py.test
cmd:pytest
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python3 python38 python39)
PYTHON_VERSIONS=(3.7 3.8 3.9)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\n\
atomicwrites_$pythonPackage\n\
attrs_$pythonPackage\n\
iniconfig_$pythonPackage\n\
importlib_metadata_$pythonPackage\n\
pluggy_$pythonPackage\n\
more_itertools_$pythonPackage\n\
packaging_$pythonPackage\n\
pyparsing_$pythonPackage\n\
toml_$pythonPackage\n\
zipp_$pythonPackage\n\
py_$pythonPackage\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_scm_$pythonPackage
"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}