aiohttp (and dependencies): recipes cleanup. (#10248)

* aiohttp: recipe cleanup.

* aiosignal: recipe cleanup.

* frozenlist: recipe cleanup.

* multidict: recipe cleanup.
This commit is contained in:
OscarL
2024-03-24 05:28:05 -03:00
committed by GitHub
parent 8d6d3eaf46
commit d8bf95ed80
4 changed files with 140 additions and 111 deletions

View File

@@ -1,13 +1,13 @@
SUMMARY="HTTP client/server for asyncio"
DESCRIPTION="Supports both client and server side of HTTP protocol. \
Supports both client and server Web-Sockets out-of-the-box and avoids \
Callback Hell. \
Supports both client and server Web-Sockets out-of-the-box and avoids Callback Hell.
Provides Web-server with middlewares and pluggable routing."
HOMEPAGE="https://pypi.python.org/pypi/aiohttp"
COPYRIGHT="2013-2021 Nikolay Kim and Andrew Svetlov"
LICENSE="Apache v2"
REVISION="5"
SOURCE_URI="https://pypi.org/packages/source/a/aiohttp/aiohttp-$portVersion.tar.gz"
REVISION="6"
SOURCE_URI="https://files.pythonhosted.org/packages/source/a/aiohttp/aiohttp-$portVersion.tar.gz"
CHECKSUM_SHA256="fc5471e1a54de15ef71c1bc6ebe80d4dc681ea600e68bfd1cbce40427f0b7578"
ARCHITECTURES="all !x86_gcc2"
@@ -23,55 +23,63 @@ REQUIRES="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
gcc$secondaryArchSuffix
"
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$secondaryArchSuffix\n\
aiosignal_$pythonPackage\n\
attrs_$pythonPackage\n\
asynctest_$pythonPackage\n\
async_timeout_$pythonPackage\n\
charset_normalizer_$pythonPackage\n\
chardet_$pythonPackage\n\
frozenlist_$pythonPackage\n\
multidict_$pythonPackage\n\
yarl_$pythonPackage\n\
cmd:python$pythonVersion\
\""
if [ "$targetArchitecture" = "x86_gcc2" ]; then
eval "PROVIDES_${pythonPackage}+=\"\n\
aiohttp_$pythonPackage = $portVersion\
PYTHON_VERSIONS=(3.10)
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
fi
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:gcc$secondaryArchSuffix
cmd:python$pythonVersion"
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_$pythonPackage+=\"
aiohttp_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
aiosignal_$pythonPackage
attrs_$pythonPackage
async_timeout_$pythonPackage
charset_normalizer_$pythonPackage
frozenlist_$pythonPackage
multidict_$pythonPackage
yarl_$pythonPackage
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
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 \
packageEntries $pythonPackage \
$prefix/lib/python*
done
}