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="4" SOURCE_URI="https://github.com/twisted/twisted/archive/twisted-$portVersion.tar.gz" CHECKSUM_SHA256="3d17049da4b7c66b11359ff29eeea103ef8356f2aec2e4fc3d78c1920fc622a1" SOURCE_DIR="twisted-twisted-$portVersion" ARCHITECTURES="any" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku " BUILD_REQUIRES=" haiku_devel " PYTHON_PACKAGES=(python39 python310) PYTHON_VERSIONS=(3.9 3.10) defaultVersion=3.9 for i in "${!PYTHON_PACKAGES[@]}"; do pythonPackage=${PYTHON_PACKAGES[i]} pythonVersion=${PYTHON_VERSIONS[$i]} eval "PROVIDES_$pythonPackage=\" ${portName}_$pythonPackage = $portVersion cmd:cftp_$pythonVersion = $portVersion cmd:ckeygen_$pythonVersion = $portVersion cmd:conch_$pythonVersion = $portVersion cmd:mailmail_$pythonVersion = $portVersion cmd:manhole_$pythonVersion = $portVersion cmd:pyhtmlizer_$pythonVersion = $portVersion cmd:tap2deb_$pythonVersion = $portVersion cmd:tap2rpm_$pythonVersion = $portVersion cmd:tkconch_$pythonVersion = $portVersion cmd:trial_$pythonVersion = $portVersion cmd:twist_$pythonVersion = $portVersion cmd:twistd_$pythonVersion = $portVersion \"" # Provide non-suffixed cmd only for the default Python version if [ $pythonVersion = $defaultVersion ]; then eval "PROVIDES_$pythonPackage+=\" cmd:cftp = $portVersion cmd:ckeygen = $portVersion cmd:conch = $portVersion cmd:mailmail = $portVersion cmd:manhole = $portVersion cmd:pyhtmlizer = $portVersion cmd:tap2deb = $portVersion cmd:tap2rpm = $portVersion cmd:tkconch = $portVersion cmd:trial = $portVersion cmd:twist = $portVersion cmd:twistd = $portVersion \"" fi eval "REQUIRES_$pythonPackage=\" haiku attrs_$pythonPackage automat_$pythonPackage bcrypt_$pythonPackage constantly_$pythonPackage cryptography_$pythonPackage hyperlink_$pythonPackage incremental_$pythonPackage typing_extensions_$pythonPackage zope_interface_$pythonPackage cmd:python$pythonVersion \"" BUILD_REQUIRES+=" incremental_$pythonPackage setuptools_$pythonPackage " 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 # Version suffix all the scripts for f in $binDir/*; do mv $f $f-$pythonVersion done # And provide suffix-less symlinks for the default version if [ $pythonVersion = $defaultVersion ]; then for f in $binDir/*; do ln -sr $f ${f%-$pythonVersion} done fi install -m 755 -d "$docDir" install -m 644 -t "$docDir" README.rst packageEntries $pythonPackage \ "$prefix"/lib/$python \ "$prefix"/bin \ "$docDir" done }