Files
haikuports/dev-python/async-timeout/async_timeout-4.0.2.recipe
OscarL 70ac5cadda python3.8: bulk removal of now obsolete "_python38" packages. (#9328)
* python3.8: bulk removal of now obsolete "_python38" packages.

Done via scripting. No functional change intended or expected.

Some manual tweaks will follow.

* python3.8: further manual tweaks after bulk-3.8-removal.

Unlike the previous commit with automated changes,
I've tested builds for *these* recipes in beta4 64 bits.
2023-09-01 18:19:50 +00:00

63 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="3"
SOURCE_URI="https://pypi.io/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_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\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
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
packageEntries $pythonPackage \
$prefix/lib/python*
done
}