mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
pytest, bump version, add dependencies (#8774)
This commit is contained in:
88
dev-python/exceptiongroup/exceptiongroup-1.1.1.recipe
Normal file
88
dev-python/exceptiongroup/exceptiongroup-1.1.1.recipe
Normal file
@@ -0,0 +1,88 @@
|
||||
SUMMARY="Backport of PEP 654 (exception groups)"
|
||||
DESCRIPTION="This is a backport of the BaseExceptionGroup and ExceptionGroup classes from \
|
||||
Python 3.11.
|
||||
|
||||
It contains the following:
|
||||
- The exceptiongroup.BaseExceptionGroup and exceptiongroup.ExceptionGroup
|
||||
classes
|
||||
- A utility function (exceptiongroup.catch()) for catching exceptions possibly
|
||||
nested in an exception group
|
||||
- Patches to the TracebackException class that properly formats exception groups
|
||||
(installed on import)
|
||||
- An exception hook that handles formatting of exception groups through
|
||||
TracebackException (installed on import)
|
||||
|
||||
If this package is imported on Python 3.11 or later, the built-in implementations of the \
|
||||
exception group classes are used instead, TracebackException is not monkey patched and the \
|
||||
exception hook won't be installed."
|
||||
HOMEPAGE="https://github.com/agronholm/exceptiongroup"
|
||||
COPYRIGHT="2022 Alex Grönholm"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="abe42a62bac0948d95bba6a48f63d8ebb21a7420fd26039a4ec951873fafaee7"
|
||||
SOURCE_FILENAME="exceptiongroup.tar.gz"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
BUILD_REQUIRES+="
|
||||
build_$pythonPackage
|
||||
flit_core_$pythonPackage
|
||||
flit_scm_$pythonPackage
|
||||
installer_$pythonPackage
|
||||
setuptools_scm_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
TEST_REQUIRES="
|
||||
cmd:pytest
|
||||
"
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
|
||||
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
python=python$pythonVersion
|
||||
|
||||
$python -m build --wheel --skip-dependency-check --no-isolation
|
||||
$python -m installer -p $prefix dist/*.whl
|
||||
|
||||
packageEntries ${PYTHON_PACKAGES[i]} \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
pytest -v
|
||||
}
|
||||
Reference in New Issue
Block a user