Files
haikuports/dev-python/twisted/twisted-22.8.0.recipe
2022-09-15 14:35:47 +02:00

179 lines
4.4 KiB
Bash

SUMMARY="An event-driven networking engine written in Python"
DESCRIPTION="Twisted is an event-based framework for internet applications.
It includes modules for many different purposes, including:
- twisted.application: A "Service" system that allows you to organize your \
application in hierarchies with well-defined startup and dependency semantics.
- twisted.cred: A general credentials and authentication system that \
facilitates pluggable authentication backends.
- twisted.enterprise: Asynchronous database access, compatible with any \
Python DBAPI2.0 modules.
- twisted.internet: Low-level asynchronous networking APIs that allow you \
to define your own protocols that run over certain transports.
- twisted.manhole: A tool for remote debugging of your services which gives \
you a Python interactive interpreter.
- twisted.protocols: Basic protocol implementations and helpers for your own \
protocol implementations.
- twisted.python: A large set of utilities for Python tricks, reflection, \
text processing, and anything else.
- twisted.spread: A secure, fast remote object system.
- twisted.trial: A unit testing framework that integrates well with \
Twisted-based code."
HOMEPAGE="https://twistedmatrix.com"
COPYRIGHT="2001-2022 Twisted project members"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/twisted/twisted/archive/twisted-$portVersion.tar.gz"
CHECKSUM_SHA256="3d17049da4b7c66b11359ff29eeea103ef8356f2aec2e4fc3d78c1920fc622a1"
SOURCE_DIR="twisted-twisted-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
"
PYTHON_PACKAGES=(python3 python38 python39 python310)
PYTHON_VERSIONS=(3.7 3.8 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\n\
attrs_$pythonPackage\n\
automat_$pythonPackage\n\
bcrypt_$pythonPackage\n\
constantly_$pythonPackage\n\
cryptography_$pythonPackage\n\
hyperlink_$pythonPackage\n\
incremental_$pythonPackage\n\
zope_interface_$pythonPackage\n\
\""
if [ "$targetArchitecture" = "x86_gcc2" ]; then
eval "PROVIDES_${pythonPackage}+=\"\n\
twisted_$pythonPackage = $portVersion\
\""
fi
BUILD_REQUIRES="$BUILD_REQUIRES
incremental_$pythonPackage
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
PROVIDES_python3="$PROVIDES_python3
cmd:cftp3
cmd:ckeygen3
cmd:conch3
cmd:mailmail3
cmd:manhole3
cmd:pyhtmlizer3
cmd:tap2deb3
cmd:tap2rpm3
cmd:tkconch3
cmd:trial3
cmd:twist3
cmd:twistd3
"
PROVIDES_python38="$PROVIDES_python38
cmd:cftp38
cmd:ckeygen38
cmd:conch38
cmd:mailmail38
cmd:manhole38
cmd:pyhtmlizer38
cmd:tap2deb38
cmd:tap2rpm38
cmd:tkconch38
cmd:trial38
cmd:twist38
cmd:twistd38
"
PROVIDES_python39="$PROVIDES_python39
cmd:cftp39
cmd:ckeygen39
cmd:conch39
cmd:mailmail39
cmd:manhole39
cmd:pyhtmlizer39
cmd:tap2deb39
cmd:tap2rpm39
cmd:tkconch39
cmd:trial39
cmd:twist39
cmd:twistd39
"
PROVIDES_python310="$PROVIDES_python310
cmd:cftp310
cmd:ckeygen310
cmd:conch310
cmd:mailmail310
cmd:manhole310
cmd:pyhtmlizer310
cmd:tap2deb310
cmd:tap2rpm310
cmd:tkconch310
cmd:trial310
cmd:twist310
cmd:twistd310
"
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
if [ $pythonPackage = python3 ]; then
for f in $prefix/bin/*; do
mv $f ${f}3
done
fi
if [ $pythonPackage = python38 ]; then
for f in $prefix/bin/*; do
mv $f ${f}38
done
fi
if [ $pythonPackage = python39 ]; then
for f in $prefix/bin/*; do
mv $f ${f}39
done
fi
if [ $pythonPackage = python310 ]; then
for f in $prefix/bin/*; do
mv $f ${f}310
done
fi
install -m 755 -d "$docDir"
install -m 644 -t "$docDir" README.rst
packageEntries $pythonPackage \
"$prefix"/lib/$python \
"$prefix"/bin \
"$docDir"
done
}