Files
haikuports/dev-python/pytest/pytest-6.1.1.recipe
2020-10-30 11:58:18 +01:00

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="8f593023c1a0f916110285b6efd7f99db07d59546e3d8c36fc60e2ab05d3be92"
ARCHITECTURES="any"
PROVIDES="
pytest=$portVersion
cmd:py.test
cmd:pytest
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python36 python3)
PYTHON_VERSIONS=(3.6 3.7)
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_$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
}