mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
async_timeout: new recipe.
This commit is contained in:
62
dev-python/async-timeout/async_timeout-3.0.1.recipe
Normal file
62
dev-python/async-timeout/async_timeout-3.0.1.recipe
Normal file
@@ -0,0 +1,62 @@
|
||||
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="1"
|
||||
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=(python36 python3)
|
||||
PYTHON_VERSIONS=(3.6 3.7)
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user