Files
haikuports/dev-python/async-timeout/async_timeout-4.0.2.recipe
2025-07-24 01:02:28 -03:00

68 lines
1.6 KiB
Bash

SUMMARY="Asyncio-compatible timeout context manager"
DESCRIPTION="The context manager is useful in cases when you want to apply \
timeout logic around block of code or in cases when asyncio.wait_for() is \
not suitable. Also it's much faster than asyncio.wait_for() \
because timeout doesn't create a new task."
HOMEPAGE="https://pypi.python.org/pypi/async_timeout"
COPYRIGHT="2019 Andrew Svetlov"
LICENSE="Apache v2"
REVISION="4"
SOURCE_URI="https://files.pythonhosted.org/packages/source/a/async-timeout/async-timeout-$portVersion.tar.gz"
SOURCE_DIR="async-timeout-$portVersion"
CHECKSUM_SHA256="2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
defaultVersion=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+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
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
}