Files
haikuports/dev-python/executing/executing-1.2.0.recipe
Oscar Lesta 9092f00130 executing: drop Python 3.9 support.
Only user on-tree (icecream) is 3.10 only already.
2025-09-19 22:53:14 -03:00

84 lines
2.0 KiB
Bash

SUMMARY="Get the currently executing AST node of a frame, and other information"
DESCRIPTION="This mini-package lets you get information about what a frame is currently doing, \
particularly the AST node being executed"
HOMEPAGE="https://github.com/alexmojaki/executing"
COPYRIGHT="2019 Alex Hall"
LICENSE="MIT"
REVISION="2"
SOURCE_URI="https://pypi.io/packages/source/e/$portName/$portName-$portVersion.tar.gz"
CHECKSUM_SHA256="19da64c18d2d851112f09c287f8d3dbbdf725ab0e569077efb6cdcbd3497c107"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
TEST_REQUIRES+="
asttokens_$pythonPackage
pytest_$pythonPackage
# To download the "littleutils" missing dependency:
cmd:wget
"
done
INSTALL()
{
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()
{
# Test require a "littleutils" package that it is not notable enough as to warrant
# its own recipe/package, IMO, so just download it for now.
if [ ! -f "littleutils/__init__.py" ]; then
mkdir littleutils
wget -c \
https://raw.githubusercontent.com/alexmojaki/littleutils/v0.2.2/littleutils/__init__.py \
-O littleutils/__init__.py
fi
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
python=python$pythonVersion
$python -m pytest
done
# Current results:
# Py 3.9: 44 passed, 15 skipped
# Py 3.10: 44 passed, 15 skipped, 1 warning
}