SUMMARY="Python serial port access library" DESCRIPTION="This module encapsulates the access for the serial port. It provides backends for Python running on Windows, OSX, Linux, BSD (possibly \ any POSIX compliant system) and IronPython. The module named "serial" automatically selects the appropriate backend." HOMEPAGE="https://github.com/pyserial/pyserial" COPYRIGHT="2001-2020 Chris Liechti" LICENSE="BSD (3-clause)" REVISION="3" srcGitRev="31fa4807d73ed4eb9891a88a15817b439c4eea2d" SOURCE_URI="https://github.com/pyserial/pyserial/archive/$srcGitRev.tar.gz" CHECKSUM_SHA256="d77a5431db2d1d8e1c7d99bc2d736981c7ae9f73d0ffff9861be94589b1c14b3" SOURCE_FILENAME="pyserial-$portVersion-$srcGitRev.tar.gz" SOURCE_DIR="pyserial-$srcGitRev" PATCHES="665.patch" ARCHITECTURES="any" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku " BUILD_REQUIRES=" haiku_devel " 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\n\ cmd:pyserial_miniterm\n\ cmd:pyserial_ports\n\ \"; \ 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* \ $prefix/bin done }