SUMMARY="Filesystem events monitoring" DESCRIPTION="Python API and shell utilities to monitor file system events." HOMEPAGE="https://pypi.python.org/pypi/watchdog" COPYRIGHT="2011 Yesudeep Mangalapilly 2012 Google, Inc." LICENSE="Apache v2" REVISION="1" SOURCE_URI="https://pypi.python.org/packages/source/w/watchdog/watchdog-$portVersion.tar.gz" CHECKSUM_SHA256="4d98a320595da7a7c5a18fc48cb633c2e73cda78f93cac2ef42d42bf609a33f9" ARCHITECTURES="any" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku " BUILD_REQUIRES=" haiku_devel " BUILD_PREREQUIRES=" cmd:gcc " PYTHON_PACKAGES=(python39 python310) PYTHON_VERSIONS=(3.9 3.10) defaultVersion=3.10 for i in "${!PYTHON_PACKAGES[@]}"; do pythonPackage=${PYTHON_PACKAGES[i]} pythonVersion=${PYTHON_VERSIONS[$i]} eval "PROVIDES_${pythonPackage}=\" ${portName}_$pythonPackage = $portVersion cmd:watchmedo_$pythonVersion = $portVersion \"" # Provide non-suffixed cmd only for the default Python version if [ $pythonVersion = $defaultVersion ]; then eval "PROVIDES_$pythonPackage+=\" cmd:watchmedo = $portVersion \"" fi eval "REQUIRES_$pythonPackage=\" haiku cmd:python$pythonVersion pyyaml_$pythonPackage \"" BUILD_REQUIRES+=" 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$pythonVersion/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 packageEntries $pythonPackage \ $prefix/lib/python* \ $binDir done }