mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
88 lines
2.1 KiB
Bash
88 lines
2.1 KiB
Bash
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="2"
|
|
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_VERSIONS=(3.10)
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
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 pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
|
|
$python -m build --wheel --skip-dependency-check --no-isolation
|
|
$python -m installer -p $prefix dist/*.whl
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
pytest -v
|
|
}
|