63 lines
1.6 KiB
Bash
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="2"
|
|
SOURCE_URI="https://pypi.io/packages/source/a/async-timeout/async-timeout-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f"
|
|
SOURCE_DIR="async-timeout-$portVersion"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
PYTHON_PACKAGES=(python3 python38 python39)
|
|
PYTHON_VERSIONS=(3.7 3.8 3.9)
|
|
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
|
|
}
|