mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
pytest, bump version, add python3.10 (#7182)
This commit is contained in:
80
dev-python/pytest/pytest-7.1.3.recipe
Normal file
80
dev-python/pytest/pytest-7.1.3.recipe
Normal file
@@ -0,0 +1,80 @@
|
||||
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="4f365fec2dff9c1162f834d9f18af1ba13062db0c708bf7b946f8a5c76180c39"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
pytest=$portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python3 python38 python39 python310)
|
||||
PYTHON_VERSIONS=(3.7 3.8 3.9 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\n\
|
||||
cmd:py.test$pythonVersion\n\
|
||||
cmd:pytest$pythonVersion\n\
|
||||
\"; \
|
||||
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:git
|
||||
cmd:python$pythonVersion
|
||||
pip_$pythonPackage
|
||||
wheel_$pythonPackage\n\
|
||||
"
|
||||
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
|
||||
|
||||
mv $prefix/bin/pytest $prefix/bin/pytest$pythonVersion
|
||||
mv $prefix/bin/py.test $prefix/bin/py.test$pythonVersion
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$prefix/bin
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user